Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <style>
- .refreshButton {
- background-color: #1A1A1A;
- border: none;
- color: #fff;
- padding: 8px 16px;
- text-align: center;
- display: inline-block;
- transition-duration: 0.4s;
- border: 2px solid #005F82;
- }
- .refreshButton:hover {
- background-color: #0077A3;
- color: #fff;
- border: 2px solid #1A1A1A;
- }
- </style>
- <center><h2>We are currently closed for maintenance, check back when the timer runs out!</h2><h2 id="countdown">0d 0h 00m 00s</h2></center>
- <script>
- // Countdown Date
- var countDownDate = new Date("Mar 30, 2020 05:35:25").getTime();
- var x = setInterval(function() {
- var now = new Date().getTime();
- var distance = countDownDate - now;
- var days = Math.floor(distance / (1000 * 60 * 60 * 24));
- var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
- var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
- var seconds = Math.floor((distance % (1000 * 60)) / 1000);
- document.getElementById("countdown").innerHTML = days + "d " + hours + "h "
- + minutes + "m " + seconds + "s ";
- if (distance < 0) {
- clearInterval(x);
- document.getElementById("countdown").innerHTML = "<input class=\"refreshButton\" type=\"button\" value = \"Refresh\" onclick=\"history.go(0)\" />";
- }
- }, 1000);
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement