Skip to content

Instantly share code, notes, and snippets.

@yaph
Last active October 27, 2023 19:14
Show Gist options
  • Save yaph/5437782 to your computer and use it in GitHub Desktop.
Save yaph/5437782 to your computer and use it in GitHub Desktop.
Check or uncheck all check boxes using browser JavaScript console
# JS snippet for email notification settings, e. g. Twitter
cb=document.querySelectorAll('input[type="checkbox"]');for(i in cb){cb[i].checked=false}
# for Drupal 4.x comment approval form
cbx=document.getElementsByClassName('form-checkbox');for(i in cbx){cbx[i].checked=true}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment