Skip to content

Instantly share code, notes, and snippets.

@zoyo23
Last active September 29, 2024 12:34
Show Gist options
  • Save zoyo23/570c4da5c63dc53af1082ab836109eed to your computer and use it in GitHub Desktop.
Save zoyo23/570c4da5c63dc53af1082ab836109eed to your computer and use it in GitHub Desktop.
var successCounter = 0;
var notSuccessCounter = 0;
var intervalInSeconds = 10
// START PROCESS
var myTimer = window.setInterval(function () {
var dateTime = new Date();
var btn = document.querySelectorAll("button[aria-label='Resgatar Bônus']")[0];
if (btn) {
console.log(dateTime.toString('MM/dd/yyyy hh:mm tt') + ' - BONUS AVAILABLE.');
btn.click();
successCounter++;
}
else {
console.log(dateTime.toString('MM/dd/yyyy hh:mm tt') + ' - BONUS NOT AVAILABLE.');
notSuccessCounter++;
}
console.log("Success: " + successCounter + " | Not Success: " + notSuccessCounter)
}, intervalInSeconds * 1000);
// STOP PROCESS
clearInterval(myTimer);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment