Skip to content

Instantly share code, notes, and snippets.

@mykecameron
Created August 21, 2013 15:44
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 mykecameron/6296148 to your computer and use it in GitHub Desktop.
Save mykecameron/6296148 to your computer and use it in GitHub Desktop.
Snippet that just clicks on task completion boxes
function blast(limit, delay) {
if(!limit) { limit = 1000; }
if(!delay) { delay = 500; }
var checkboxes = $('ul.tasks input[type="checkbox"]').toArray();
(function clickLoop(limit, checkboxes, delay) {
setTimeout(function() {
var checkbox = checkboxes.pop();
checkbox.click();
if(limit-- && (checkboxes.length > 0)) { clickLoop(limit, checkboxes, delay); }
}, delay);
})(limit, checkboxes, delay);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment