Last active
October 23, 2018 17:12
-
-
Save amandoabreu/13ad473ff371e8b26129a3c5a50ecc06 to your computer and use it in GitHub Desktop.
Downvote all reddit comments in any given page(vanilla)
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
/* Likely is caught by vote-spamming filters, | |
but it's just to feel better anyway, | |
just copy and paste the following into your console and press enter | |
*/ | |
var simulateClick = function (elem) { | |
var evt = new MouseEvent('click', { | |
bubbles: true, | |
cancelable: true, | |
view: window | |
}); | |
var canceled = !elem.dispatchEvent(evt); | |
}; | |
document.querySelectorAll(".VoteArrow.icon-downvote.m-unvoted").forEach(function(isto){ | |
simulateClick(isto); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment