Created
August 21, 2013 15:44
-
-
Save mykecameron/6296148 to your computer and use it in GitHub Desktop.
Snippet that just clicks on task completion boxes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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