Created
March 31, 2017 06:49
-
-
Save pejobo/3b3d3fae1e4d66065090d47d95831fd6 to your computer and use it in GitHub Desktop.
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 Color Checkbox | |
// @namespace http://<domain> | |
// @version 0.1 | |
// @description Ensures the color checkbox to be checked. | |
// @author DRe | |
// @match https://<sub-domain>/secure/RapidBoard.jspa?rapidView=175&* | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
var timeout = 10000; | |
var started = Date.now(); | |
function clickColorCheckbox() { | |
var checkbox = document.getElementById("ghx-colorcontrol-range"); | |
if (checkbox) { | |
if (!checkbox.checked) { | |
checkbox.click(); | |
} | |
/* | |
var controls = document.getElementById("ghx-color-controls"); | |
if (controls) { | |
controls.parentNode.removeChild(controls); | |
} | |
*/ | |
} else if (Date.now() - started < timeout) { | |
setTimeout(clickColorCheckbox, 10); | |
} | |
} | |
clickColorCheckbox(); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment