Created
April 4, 2018 17:15
-
-
Save johnsnook/fde5bf8e1d7814f6b19b47a723d99b1b to your computer and use it in GitHub Desktop.
Reddit upvote 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 "Upvote 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 = []; | |
| $('.up').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