SHARE
TWEET

Untitled

a guest Apr 21st, 2019 86 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <h1>Server Release in : <span id="countdown" class="timer"></span></h1>
  2. <script>
  3. var upgradeTime = 172801;
  4. var seconds = upgradeTime;
  5. var timerMilSec = window.localStorage.GetItem("date");
  6.  
  7. if(!lastDate || lastDate < Date.now().getTime()) {
  8.   timerMilSec = Date.now().getTime()+upgradeTime;
  9. }
  10. function timer() {
  11.   var difference =  timerMilSec - Date.now().getTime();
  12.   var days = Math.floor(seconds / 24 / 60 / 60),
  13.     hoursLeft = Math.floor((seconds) - (days * 86400)),
  14.     hours = Math.floor(hoursLeft / 3600),
  15.     minutesLeft = Math.floor((hoursLeft) - (hours * 3600)),
  16.     minutes = Math.floor(minutesLeft / 60),
  17.     remainingSeconds = seconds % 60;
  18.  
  19.   function pad(n) {
  20.     return (n < 10 ? "0" + n : n);
  21.   }
  22.   document.getElementById('countdown').innerHTML = pad(days) + ":" + pad(hours) + ":" + pad(minutes) + ":" + pad(remainingSeconds);
  23.   if (seconds == 0) {
  24.     clearInterval(countdownTimer);
  25.     document.getElementById('countdown').innerHTML = "Completed";
  26.   } else {
  27.     seconds--;
  28.   }
  29. }
  30. </script>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top