Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var confirmbutton_clicked = 0;
  2. var buy_clicked = false;
  3.  
  4. time1=setInterval(function(){
  5.  
  6. timer_hours = parseInt(jQuery(".syotimer-cell_type_hour").children()[0].textContent);
  7. timer_minutes = parseInt(jQuery(".syotimer-cell_type_minute").children()[0].textContent);
  8. timer_seconds = parseInt(jQuery(".syotimer-cell_type_second").children()[0].textContent);
  9.  
  10. if(timer_hours === 0 && timer_minutes === 0 && timer_seconds === 0){
  11. jQuery("#mainformsubmit").click(); // нажимается кнопка «купить»
  12. buy_clicked = true;
  13. console.log("Покупаем!");
  14. }
  15. else
  16. console.log(timer_hours+":"+timer_minutes+":"+timer_seconds);
  17.  
  18. },100);
  19.  
  20. time2=setInterval(function(){
  21. if(buy_clicked){
  22. if(confirmbutton_clicked < 10){
  23. jQuery("#confirmbutton").click(); // нажимается кнопка подтвердить
  24. console.log("Подтверждаем!");
  25. confirmbutton_clicked++;
  26. }
  27. }
  28. },100);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement