Created
August 7, 2020 03:58
-
-
Save EsmailELBoBDev2/6533b4d9533350c8ee455fbe8913964a to your computer and use it in GitHub Desktop.
It's a JS script to upvote reddit posts automatically
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 upvote() { | |
document.querySelectorAll('[data-click-id="upvote"]').forEach((b, i) => { | |
setTimeout(() => { | |
if (b.getAttribute("aria-pressed") == "true") { | |
console.log("already upvoted..."); | |
} else if (b.getAttribute("aria-pressed") == "false") { | |
b.click(); | |
console.log("upvoting..."); | |
} else { | |
console.log("something went wrong..."); | |
} | |
}, i * 1000); | |
}); | |
} | |
upvote() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
epic scipt bro