Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2019
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. // Seconds
  2. var RELOAD_TIME = 600;
  3.  
  4. function __checkTime () {
  5. if(RELOAD_TIME <= 0 ) {
  6. window.location.reload();
  7. }
  8. }
  9.  
  10. function __count () {
  11. setTimeout(() => {
  12.  
  13. RELOAD_TIME--;
  14. __checkTime();
  15.  
  16. __count();
  17. }, 1000);
  18.  
  19. }
  20.  
  21. __count();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement