Last active
April 4, 2018 17:15
-
-
Save johnsnook/57e74a7c74899f53998ef1a5d51d7da1 to your computer and use it in GitHub Desktop.
Reddit downvote all bookmark button
This file contains hidden or 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
| /** | |
| * @Author: John Snook | |
| * Installation: | |
| * 1) In Chrome or Firefox, create a bookmark, (eg bookmark this page). | |
| * 2) Then, right click on the bookmark, and select "edit...". | |
| * 3) Change 'Name' field to "Downvote all" or "▼*" | |
| * 4) Copy and paste the code below into the "Url" field. (not the comments) | |
| * 5) Go to https://reddit.com/r/all, log in and click your new bookmark. | |
| */ | |
| javascript: (function() { | |
| var q = []; | |
| $('.down').each(function() { | |
| var that = this; | |
| var f = function(index) { | |
| $(that).trigger('click'); | |
| setTimeout(function() { | |
| if (q[index]) { | |
| q[index](index + 1); | |
| } else { | |
| if (downVoteTimer) { | |
| window.clearTimeout(downVoteTimer); | |
| } | |
| } | |
| }, 1100); | |
| }; | |
| q.push(f); | |
| }); | |
| var downVoteTimer = window.setTimeout(function() { | |
| q[0](1); | |
| }, 50); | |
| }()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment