Guest User

Вопрос на двач

a guest
May 23rd, 2020
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function doCheck() {
  2.     const now = new Date();
  3.     if (now.getHours() !== 12) { // часы
  4.     timeout();
  5.     } else {
  6.     if (now.getMinutes() !== 35) { // минуты
  7.     timeout();
  8.     } else {
  9.     if (now.getSeconds() !== 57) { // секунды
  10.     timeout();
  11.     } else {
  12.     if (now.getMilliseconds() < 500) { // миллисекунды
  13.     timeout()
  14.     } else {
  15.     document.querySelector("#go > div.buttonContainer > button").click();
  16.     }
  17.     }
  18.     }
  19.     }
  20.     }
  21. function timeout() {
  22.     setTimeout(() => {
  23.     doCheck();
  24.     }, 50)
  25.     }
  26. doCheck();
Add Comment
Please, Sign In to add comment