Skip to content

Instantly share code, notes, and snippets.

@kraken-chris
Created March 1, 2023 19:33
Show Gist options
  • Save kraken-chris/2df8d4073c975b40139c2d732cfe88ef to your computer and use it in GitHub Desktop.
Save kraken-chris/2df8d4073c975b40139c2d732cfe88ef to your computer and use it in GitHub Desktop.
Select all checkboxes on a page
javascript:(function(){function checkFrames(w) {try {var inputs = w.document.getElementsByTagName('input');for (var i=0; i < inputs.length; i++) {if (inputs[i].type && inputs[i].type == 'checkbox'){inputs[i].checked = !inputs[i].checked;}}} catch (e){}if(w.frames && w.frames.length>0){for(var i=0;i<w .frames.length;i++){var fr=w.frames[i];checkFrames(fr);}}}checkFrames(window);})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment