Skip to content

Instantly share code, notes, and snippets.

@pwilms
Last active July 30, 2019 02:22
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save pwilms/816ad0a12abe1349e5b18f0257095205 to your computer and use it in GitHub Desktop.
Save pwilms/816ad0a12abe1349e5b18f0257095205 to your computer and use it in GitHub Desktop.
Toggle Jira Columns
// ==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