Last active
May 16, 2017 13:49
-
-
Save sublimino/babcc810ad5726b4224a2cd60be7067d to your computer and use it in GitHub Desktop.
Tampermonkey: Jenkins Pipeline jobs-link-to-console
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 Jenkins Pipeline - Link to Console | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author You | |
// @match https://bc-jenkins.ci.digital.homeoffice.gov.uk/*job/*/console* | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
window.onclick = function() { | |
document.querySelectorAll("a[href*='_test/']") | |
.forEach( | |
function(a) { | |
if (a.href.match(/_test\/[0-9]+\/$/)) { | |
a.href = a.href + 'console'; | |
} | |
}); | |
}; | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment