|
@@ -0,0 +1,122 @@
|
|
|
|
+
|
|
|
|
+var script_1710385880 = {};
|
|
|
|
+script_1710385880.bet_hi = false;
|
|
|
|
+script_1710385880.working = false;
|
|
|
|
+script_1710385880.series = 0;
|
|
|
|
+script_1710385880.last_number = '';
|
|
|
|
+script_1710385880.state = 0;
|
|
|
|
+script_1710385880.tick_state;
|
|
|
|
+script_1710385880.timer_time = 500; // 0.5 sec
|
|
|
|
+script_1710385880.timerId;
|
|
|
|
+
|
|
|
|
+function qi(name){ return document.getElementById(name); }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+function simulateMouseClick(el){
|
|
|
|
+ //const MouseEvents = ['mousedown', 'focusin'];
|
|
|
|
+ const MouseEvents = ['click'];
|
|
|
|
+ MouseEvents.forEach(eventType =>
|
|
|
|
+ el.dispatchEvent(
|
|
|
|
+ new MouseEvent(eventType, { bubbles: true })
|
|
|
|
+ )
|
|
|
|
+ );
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+script_1710385880.started = function(){
|
|
|
|
+ script_1710385880.working = true;
|
|
|
|
+ script_1710385880.state = 1;
|
|
|
|
+ qi('script_1710385880_btn').classList.add('working');
|
|
|
|
+ console.log('started');
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+script_1710385880.stopped = function(){
|
|
|
|
+ clearTimeout(script_1710385880.timerId);
|
|
|
|
+ qi('script_1710385880_btn').classList.remove('working');
|
|
|
|
+ script_1710385880.working = false;
|
|
|
|
+ script_1710385880.state = 0;
|
|
|
|
+ script_1710385880.series = 0;
|
|
|
|
+ script_1710385880.timer_time = 500; // set default
|
|
|
|
+ console.log('stopped');
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+// check maybe result already exists
|
|
|
|
+script_1710385880.maybe_result = function(){
|
|
|
|
+ var maybe_new_num = qi('multiplier_first_digit').value + qi('multiplier_second_digit').value +
|
|
|
|
+ qi('multiplier_third_digit').value + qi('multiplier_fourth_digit').value + qi('multiplier_fifth_digit').value;
|
|
|
|
+ if(maybe_new_num !== script_1710385880.last_number){
|
|
|
|
+ // got result
|
|
|
|
+ script_1710385880.last_number = maybe_new_num;
|
|
|
|
+
|
|
|
|
+ var maybe_win = ( qi('double_your_btc_bet_win').style.display === 'block' );
|
|
|
|
+ var maybe_loose = ( qi('double_your_btc_bet_lose').style.display === 'block' );
|
|
|
|
+
|
|
|
|
+ if(maybe_win){
|
|
|
|
+ var was_min = ( qi('double_your_btc_stake').value !== '0.00000001' );
|
|
|
|
+ if(was_min){ script_1710385880.state = 1; return } // click BET AMOUNT = MIN
|
|
|
|
+ script_1710385880.state = 3; // go click bet
|
|
|
|
+ console.log('win');
|
|
|
|
+
|
|
|
|
+ }else if(maybe_loose){
|
|
|
|
+ console.log('lose');
|
|
|
|
+ script_1710385880.state = 2; // click BET AMOUNT = 2x // next go click bet
|
|
|
|
+ }else{ script_1710385880.state = 3; } // 1st bet
|
|
|
|
+ } // else do nothing -- waiting for result
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+script_1710385880.do_start_stop = function(){
|
|
|
|
+ if(script_1710385880.working){ script_1710385880.stopped(); return }
|
|
|
|
+ script_1710385880.started();
|
|
|
|
+
|
|
|
|
+script_1710385880.tick_state = function(){
|
|
|
|
+ var bet_btn = (script_1710385880.bet_hi) ? qi('double_your_btc_bet_hi_button') : qi('double_your_btc_bet_lo_button');
|
|
|
|
+ if(script_1710385880.state === 0){
|
|
|
|
+ // just stopped
|
|
|
|
+ // do nothing
|
|
|
|
+
|
|
|
|
+ }else if(script_1710385880.state === 1){
|
|
|
|
+ // set bet amount 1 satoshi = 0.00000001
|
|
|
|
+ simulateMouseClick( qi('double_your_btc_min') );
|
|
|
|
+ script_1710385880.state = 3;
|
|
|
|
+ script_1710385880.timer_time = 100;
|
|
|
|
+
|
|
|
|
+ }else if(script_1710385880.state === 2){
|
|
|
|
+ // double bet amount
|
|
|
|
+ simulateMouseClick( qi('double_your_btc_2x') );
|
|
|
|
+ script_1710385880.state = 3;
|
|
|
|
+ script_1710385880.timer_time = 100;
|
|
|
|
+
|
|
|
|
+ }else if(script_1710385880.state === 3){
|
|
|
|
+ // click bet lo
|
|
|
|
+ simulateMouseClick(bet_btn);
|
|
|
|
+ script_1710385880.state = 4;
|
|
|
|
+ script_1710385880.timer_time = 1000; // wait 1 sec or more time
|
|
|
|
+
|
|
|
|
+ }else if(script_1710385880.state === 4){
|
|
|
|
+ // wait for bet result - check is result exists and maybe wait more
|
|
|
|
+ script_1710385880.timer_time = 200;
|
|
|
|
+ script_1710385880.maybe_result();
|
|
|
|
+ }
|
|
|
|
+ if(script_1710385880.state !== 0){ script_1710385880.timerId = setTimeout(script_1710385880.tick_state, script_1710385880.timer_time); }
|
|
|
|
+};
|
|
|
|
+if(script_1710385880.state !== 0){ script_1710385880.timerId = setTimeout(script_1710385880.tick_state, script_1710385880.timer_time); }
|
|
|
|
+
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+script_1710385880.do_bind_scripts = function(){
|
|
|
|
+
|
|
|
|
+ // add start/stop btn -- blue shadows = not working, green shadows = working
|
|
|
|
+ document.head.insertAdjacentHTML('beforeend',`<style>div#script_1710385880_btn{display:block;position:fixed;width:55px;height:55px;top:130px;right:175px;cursor:pointer;z-index:777;border-radius:10px;border:1px solid gray;box-shadow: 5px 5px 5px #0559b3;background-color:#fff;background-repeat:no-repeat;background-position:50% center;background-size:35px 35px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath d='M440.5 88.5l-52 52L415 167c9.4 9.4 9.4 24.6 0 33.9l-17.4 17.4c11.8 26.1 18.4 55.1 18.4 85.6 0 114.9-93.1 208-208 208S0 418.9 0 304 93.1 96 208 96c30.5 0 59.5 6.6 85.6 18.4L311 97c9.4-9.4 24.6-9.4 33.9 0l26.5 26.5 52-52 17.1 17zM500 60h-24c-6.6 0-12 5.4-12 12s5.4 12 12 12h24c6.6 0 12-5.4 12-12s-5.4-12-12-12zM440 0c-6.6 0-12 5.4-12 12v24c0 6.6 5.4 12 12 12s12-5.4 12-12V12c0-6.6-5.4-12-12-12zm33.9 55l17-17c4.7-4.7 4.7-12.3 0-17-4.7-4.7-12.3-4.7-17 0l-17 17c-4.7 4.7-4.7 12.3 0 17 4.8 4.7 12.4 4.7 17 0zm-67.8 0c4.7 4.7 12.3 4.7 17 0 4.7-4.7 4.7-12.3 0-17l-17-17c-4.7-4.7-12.3-4.7-17 0-4.7 4.7-4.7 12.3 0 17l17 17zm67.8 34c-4.7-4.7-12.3-4.7-17 0-4.7 4.7-4.7 12.3 0 17l17 17c4.7 4.7 12.3 4.7 17 0 4.7-4.7 4.7-12.3 0-17l-17-17zM112 272c0-35.3 28.7-64 64-64 8.8 0 16-7.2 16-16s-7.2-16-16-16c-52.9 0-96 43.1-96 96 0 8.8 7.2 16 16 16s16-7.2 16-16z'/%3E%3C/svg%3E");}div#script_1710385880_btn.working{box-shadow: 5px 5px 5px #2de03b}</style>`);
|
|
|
|
+
|
|
|
|
+ var div = document.createElement('div');
|
|
|
|
+ div.id = 'script_1710385880_btn';
|
|
|
|
+ div.setAttribute('title', 'Start / Stop');
|
|
|
|
+ document.body.appendChild(div);
|
|
|
|
+
|
|
|
|
+ qi('disable_animation_checkbox').checked = true;
|
|
|
|
+ qi('manual_enable_sounds').checked = true;
|
|
|
|
+ qi('script_1710385880_btn').addEventListener('click', script_1710385880.do_start_stop);
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+
|