Automate unchecking checkboxes
I'm doing some testing of an upgrade for a site from Drupal 4.7.x to 5.x. As part of the major version upgrades in Drupal, you're supposed to disable all the modules you have installed. Since I got tired of unchecking boxes, I used the Greasemonkey addon for Firefox 2 to do it for me.
Once the addon is installed, right click on the monkey face in your status bar and make a new user script.
name: Uncheck Boxes
namespace: uncheck_boxes
description: Unchecks all checkboxes that are enabled by default
include: http://yourtestlocation/admin/modules
When you hit ok, your default text editor will ask you for script content.
// ==UserScript==<br>// @name Uncheck Boxes<br>// @namespace uncheck_boxes<br>// @description Unchecks all checkboxes enabled by default<br>// @include http://davidnorman.local/test25/admin/modules<br>// ==/UserScript==<br><br>var chkboxes=document.getElementsByTagName('input')<br>for (var i=0; i < chkboxes.length; i++) {<br> if (chkboxes[i].type=="checkbox") {<br> chkboxes[i].checked=false<br> }<br>}
That's it! Reload your modules page and all the checkboxes should be unchecked by default. When you're done disabling, you can right click the monkey face and uncheck your Uncheck Boxes script, disable Greasemonkey, or leave it available for other sites you want to uncheck by default.
Post categories