Last active
May 17, 2020 03:48
-
-
Save sueplex/ff50383e5ad07b73e73869555398ac19 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
be=$('#balance')[0];we=$('#wager')[0];st=0;wo=new MutationObserver(function(l, o){if(st===0){st=1;setTimeout(function(){$.ajax({type:'get','url':'../state.json',success:function(sr){bs=JSON.parse(sr);if(bs.status==='open'){opp=0;fc=1;dp=bs.p1total/bs.p2total;if(bs.p1total == 0 || bs.p2total == 0){dp=1}if(dp<1){opp=1;dp=1/dp}if(dp>=1&&dp<1.5){opp=Date.now();fc=2}if(dp>7){opp++;fc=5};$.ajax({type:'post',url:'../ajax_place_bet.php',data:`selectedplayer=player${(opp%2)+1}&wager=${Math.floor(be.innerHTML.replace(',','')/fc)}`});}}});st=0;},6000)}});bb = document.createElement('div');ab=0;bb.addEventListener("click",function(){if(ab===1){bb.innerHTML='Start Autobet';bb.style.background='green';wo.disconnect();ab=0;return}ab=1;bb.style.background='red';wo.observe(we,{attributes:true});bb.innerHTML='Stop Autobet';});bb.innerHTML='Start Autobet';bb.style.background='green';bb.style.border='2px solid black';bb.style.border_radius='5px';bb.style.padding='3px';bb.style.position='absolute';bb.style.right='5%';bb.style.top='21%';$('#fightcard')[0].appendChild(bb); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment