Skip to content

Instantly share code, notes, and snippets.

@AlexChesters
Last active October 7, 2020 13:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AlexChesters/127ad55352e3c6ef132a71c093dcf4df to your computer and use it in GitHub Desktop.
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
// ==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)
@AlexChesters
Copy link
Author

Works by adding a button titled "Select all" underneath the search box

Screenshot 2020-10-07 at 14 36 42

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment