Created
September 3, 2018 07:42
-
-
Save vctls/26883c250d89bca0630d8712ab04fffd to your computer and use it in GitHub Desktop.
Display Jenkins pipeline options and script editor in full width.
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 Wide Jenkins | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Display pipeline options in wide screen. | |
// @author Victor Toulouse | |
// @match http://jenkins-ci.org | |
// @grant none | |
// ==/UserScript== | |
/** | |
* Wait for the script editor to appear. | |
*/ | |
function check(changes, observer) { | |
if(document.querySelector('tr.dropdownList-container:nth-child(215) > td:nth-child(1)')) { | |
observer.disconnect(); | |
document.querySelector('tr.dropdownList-container:nth-child(215) > td:nth-child(1)').style.display = 'none'; | |
document.querySelector('tr.dropdownList-container:nth-child(215) > td:nth-child(2)').colSpan = '3'; | |
} | |
} | |
(function() { | |
'use strict'; | |
document.querySelector('.container').style.width = '100%'; | |
document.querySelector('.container').style.padding = '0'; | |
document.querySelector('.col-md-offset-2').style.width = '100%'; | |
document.querySelector('.col-md-offset-2').style.margin = '0'; | |
(new MutationObserver(check)).observe(document, {childList: true, subtree: true}); | |
})(); |
@unrue you need to install a browser extension like Tampermonkey or Greasemonkey then add the script to it.
But you should use the improved version by @a2intl : https://gist.github.com/a2intl/293a76ae3323ec21d7cdceb6f7cd63af
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How I have to use that script?