Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html style="display:block; height:100%; margin:0; padding:0"
- <head>
- <style type="text/css">
- html {
- background: #000000;
- }
- #timer {
- padding: 100px;
- font-family: sans-serif;
- font-weight: bold;
- color: #FFFFFF;
- }
- </style>
- <meta http-equiv="refresh" content="1800">
- </head>
- <body style="display:table; width:100%; height:100%; margin:0; padding:0">
- <div style="display:table-cell; width:100%; height:100%; text-align:center; vertical-align:middle">
- <span id="timer" style="font-size:400pt; font-kerning:none"></span>
- </div>
- <script type="text/javascript">
- function checklength(i) {
- 'use strict';
- if (i < 10) {
- i = "0" + i;
- }
- return i;
- }
- var minutes, seconds, count, counter, timer;
- count = 1801; //seconds
- counter = setInterval(timer, 1000);
- function timer() {
- 'use strict';
- count = count - 1;
- minutes = checklength(Math.floor(count / 60));
- seconds = checklength(count - minutes * 60);
- if (count < 0) {
- clearInterval(counter);
- return;
- }
- document.getElementById("timer").innerHTML = '' + minutes + ':' + seconds + ' ';
- if (count === 0) {
- location.reload();
- }
- }
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement