Skip to content

Instantly share code, notes, and snippets.

@amandoabreu
Last active October 23, 2018 17:12
Show Gist options
  • Save amandoabreu/13ad473ff371e8b26129a3c5a50ecc06 to your computer and use it in GitHub Desktop.
Save amandoabreu/13ad473ff371e8b26129a3c5a50ecc06 to your computer and use it in GitHub Desktop.
Downvote all reddit comments in any given page(vanilla)
/* 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