Predict Stop Dice
Predict Stop Dice
function checkButton(){
autoButtonFound = false;
for (var i = 0; i < 100; i++) {
try{
if (document.querySelectorAll('button')[i].dataset.test == 'auto-bet-button')
{
autoButton = document.querySelectorAll('button')[i];
autoButtonFound = true;
break;
}
}catch(error){
//console.log('Error');
}
}
if(autoButtonFound){
console.log('Autobets found');
checkAuto(); ///start checking
}else{
console.log('Autobets not found');
alert('Autobets not found');
}
//autoButton.click();
}
function checkAuto(){
if(autoButtonFound && runCheck){
if(autoButton.dataset.autobetStatus == 'start'){
console.log('Autobets stopped, restarting ...');
autoButton.click();
}else{
console.log('Autobets running');
}
if(autoButtonFound && runCheck) setTimeout(() => { checkAuto() },
intervalCheck * 1000); //interval checking, sec.
}
}
//if(autoButtonFound && runCheck) setTimeout(() => { checkAuto() }, 10 * 1000);
//start checking
var _sstart = 0;
function addLib(src, cb) {
var s = document.createElement('script');
s.type = 'text/javascript';
s.src = src;
s.onload = cb;
document.head.appendChild(s);
}
addLib('https://code.jquery.com/jquery-3.6.3.min.js', () => {
$(`<style>
#script, #rescript {
position: absolute;
margin-left: 10%;
top: 10%;
width: 200px;
height: 45px;
background: #111;
border: none;
border-radius: 3px;
color: #fff;
cursor: pointer;
}
/*
#rescript {
margin-left: 25%;
width: 70px;
height: 45px;
background: #ace
}
*/
#script:hover, #rescript:hover {
background: #333
}
</style>
<input type="button" value="START Checking" id="script">`).appendTo('body');
//<input type="button" value="START Checking" id="script"><input type="button"
value="RESET" id="rescript">`).appendTo('body');
$('#script').click(function(){
_sstart = !_sstart;
if (!_sstart) {
this.value='START Checking';
//this.style='color:green';
this.style='background:#111';
runCheck = false;
return;
} else {
this.value='STOP Checking';
//this.style='color:red';
this.style='background:#a00';
runCheck = true;
checkButton();
///if(autoButtonFound && runCheck) checkAuto(); //setTimeout(() =>
{ checkAuto() }, 10 * 1000); //start checking
};
});
/*
$('#rescript').click(function(){
_f();
});
*/
})