How to write correctly?

the purpose of the script is to a certain time, click on the exit button
var ExitTimer = {};

ExitByInterval function(enabled) {
 if (enabled) {
 // The restart interval is chosen randomly between 5минутами and 10минутами
 var minMinutes = 60;
 var maxMinutes = 120;
 var interval = Math.round(
 Math.random() * (minMinutes * 60 * 1000 - maxMinutes * 60 * 1000) +
 maxMinutes * 60 * 1000
);
 ExitTimer[mylogin] = setInterval(ExitByIntervalHandler, interval);
external.AddToChat(
 "<b>Restart will be made via: </b> " +
 interval / 60 / 1000 +
 "minutes"
);
 } else {
clearInterval(ExitTimer[mylogin]);
 external.AddToChat("<b>Restart cancelled</b>");
}
}

ExitByIntervalHandler function() {
scriptpath.ClickFix();
 external.AddToChat("<b>there was an attempt a restart. Successfully?</b>");
$('iframe[name^="header"]')
.contents()
.find('td[onclick*="Out="]')[0]
.click();
}
April 7th 20 at 15:54
0 answer

Find more questions by tags JavaScript