Last active
July 30, 2019 02:22
-
-
Save pwilms/816ad0a12abe1349e5b18f0257095205 to your computer and use it in GitHub Desktop.
Toggle Jira Columns
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Jira Column Toggle | |
// @namespace https://gist.github.com/pwilms/816ad0a12abe1349e5b18f0257095205 | |
// @version 0.3 | |
// @description toggle single columns with a click | |
// @author Patric Wilms | |
// @match */secure/RapidBoard.jspa* | |
// @updateURL https://gist.github.com/pwilms/816ad0a12abe1349e5b18f0257095205/raw/571906cdec8218a43737da2fb88f5b92b8f21630/jiraColumnToggle.user.js | |
// @downloadURL https://gist.github.com/pwilms/816ad0a12abe1349e5b18f0257095205/raw/571906cdec8218a43737da2fb88f5b92b8f21630/jiraColumnToggle.user.js | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
var checkExist = setInterval(function() { | |
if ($('.ghx-column-headers h2').length > 2) { | |
$(".ghx-column-headers h2").click(function(){ | |
var id = $(this).parent().attr("data-id"); | |
$( "[data-column-id='"+id+"'],[data-id='"+id+"']" ).hide() | |
}).css('cursor', 'pointer'); | |
$(".ghx-controls-work").append($('<div style="float:right">Alle Spalten anzeigen</div>').click(function(){ | |
$(".ghx-column").show(); | |
}).css('cursor', 'pointer')); | |
clearInterval(checkExist); | |
}else{ | |
console.log("not available",$('.ghx-column-headers').length); | |
} | |
}, 100); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment