setInterval crashes my browser when running a user script?
Okay so the script works but setInterval keeps crashing my browser after
30secs or so. At least I think that's what's happening.
Here's the code:
var count = 0;
setInterval(function()
{
var ifLose = document.getElementById('result-text').innerHTML;
if (ifLose.length > 4)
{
count++;
document.getElementById("bet-multiplier").click();
document.getElementById("bet-bt").click();
}
else
{
for (count > 0; count--;)
{
document.getElementById("bet-divider").click();
}
document.getElementById("bet-bt").click();
}
}, 1000);
What am I doing wrong? Does it have something to do with count and the for
loop? Any help is greatly appreciated!
No comments:
Post a Comment