Last active
October 7, 2020 13:37
-
-
Save AlexChesters/127ad55352e3c6ef132a71c093dcf4df to your computer and use it in GitHub Desktop.
Greasemonkey script to allow you to easily select all Jenkins plugins to update them
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 - select all plugins | |
// @version 0.1 | |
// @description provides a utility button to allow you to select all Jenkins plugins at once | |
// @author Alex Chesters | |
// @match https://ci.itv.test.tools.bbc.co.uk/pluginManager/ | |
// ==/UserScript== | |
const selectAll = () => { | |
const allInputs = document.querySelectorAll('table input') | |
for (let i = 0; i < allInputs.length; i++) { | |
allInputs[i].checked = true | |
} | |
} | |
const container = document.getElementById('filter-container') | |
const button = document.createElement('button') | |
button.innerText = 'Select all' | |
button.onclick = selectAll | |
button.style = 'margin-top: 10px' | |
container.appendChild(button) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Works by adding a button titled "Select all" underneath the search box