Facebook
From Idiotic Mousedeer, 6 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 231
  1. var upEvent = new MouseEvent('mouseup', {
  2.     view: window,
  3.     bubbles: true,
  4.     cancelable: true
  5.   });
  6. var downEvent = new MouseEvent('mousedown', {
  7.     view: window,
  8.     bubbles: true,
  9.     cancelable: true
  10.   });
  11. var myClick = function(text, number = 0){
  12.     $(text)[number].dispatchEvent(downEvent);
  13.     $(text)[number].dispatchEvent(upEvent);
  14. }
  15.  
  16. var startChecking = function(){
  17.     var data = new Date();
  18.     console.log('Time:', data.getHours(), data.getMinutes(), data.getSeconds());
  19.     setTimeout(function(){
  20.         myClick('.btnSBC');
  21.         setTimeout(function(){
  22.             myClick('.btnTransfers');
  23.             setTimeout(function(){
  24.                 if($('.sold .value').html() > 0){
  25.                     myClick('.transferListTile');
  26.                     setTimeout(function(){
  27.                         myClick('#TradePile .btn-raised');
  28.                         setTimeout(function(){
  29.                             myClick('#TradePile .btn-raised', 1);
  30.                             setTimeout(function(){
  31.                                 myClick('.btn-flat',1);
  32.                                 setTimeout(function(){
  33.                                     myClick('.btnTransfers');
  34.                                 },5000);
  35.                             });
  36.                         }, 2000);
  37.                     },2000);
  38.                 } else if($('.textField.all .count').html() > $('.textField.active .value').html()){
  39.                     myClick('.transferListTile');
  40.                     setTimeout(function(){
  41.                         myClick('#TradePile .btn-raised', 1);
  42.                         setTimeout(function(){
  43.                             myClick('.btn-flat',1);
  44.                             setTimeout(function(){
  45.                                 myClick('.Dialog.ui-dialog-type-message .btn-flat',1);
  46.                                 setTimeout(function(){
  47.                                     myClick('.btnTransfers');
  48.                                 });
  49.                             },5000);
  50.                         });
  51.                     },2000);
  52.                 }
  53.             },2000)
  54.         },2000);
  55.         startChecking();
  56.     }, 50000);
  57. }
  58.  
  59. var blur = new MouseEvent('blur', {
  60.     view: window,
  61.     bubbles: true,
  62.     cancelable: true
  63. });
  64.  
  65. var myBlur = function(text, number = 0){
  66.     $(text)[number].dispatchEvent(blur);
  67. }
  68.  
  69. function spr(){
  70.     var min = null;
  71.     for(var i = 0; i<$('.auctionValue .label').length; i++){
  72.         if($('.auctionValue .label')[i].innerHTML === "Buy Now"){
  73.             var value = $('.auctionValue .coins.value')[i].innerHTML;
  74.             value = value.replace(/,/g, '');
  75.             if(!min || parseInt(value) < min) min = parseInt(value);
  76.         }
  77.     }
  78.     return min;
  79. }
  80.  
  81. function go(){
  82.     myClick('.standard',5);
  83.     setTimeout(function(){
  84.         var price = spr();
  85.         myClick('.btn-flat.back.headerButton');
  86.         setTimeout(function(){
  87.             myClick('.list.accordian');
  88.             if(parseInt($('.coins.bandingLabel')[0].innerHTML.substr(5)) > price-100){
  89.                 $('.numericInput.filled')[0].value = parseInt($('.coins.bandingLabel')[0].innerHTML.substr(5));
  90.             } else {
  91.                 $('.numericInput.filled')[0].value = price - 100;
  92.             }
  93.             $('.numericInput.filled')[1].value = price;
  94.         },1000);
  95.     },1000);
  96. }
  97.  
  98. $(document).keypress(function( event ) {
  99.     if ( event.which === 96 ) {
  100.         event.preventDefault();
  101.         go();
  102.     }
  103. });