Skip to content

Instantly share code, notes, and snippets.

@Gesugao-san
Last active September 6, 2024 07:03
Show Gist options
  • Save Gesugao-san/8595b3d00d660288fe318814cf16f419 to your computer and use it in GitHub Desktop.
Save Gesugao-san/8595b3d00d660288fe318814cf16f419 to your computer and use it in GitHub Desktop.
// For https://topersoft.com/
function randomIntFromInterval(min, max) {
return Math.floor(Math.random() * (max - min + 1) + min);
}
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
async function likeAllComment() {
var messages = document.querySelectorAll('.vote-good');
for (var i = 0; i < messages.length; i++) {
await sleep(1000 + randomIntFromInterval(100, 900)).then(() => {
messages[i].click();
});
}
console.log("Done");
}
likeAllComment()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment