multiplayerpiano/static/countdown.html
2021-10-21 15:08:09 -04:00

27 lines
643 B
HTML

<style>
body, td {
background: #631;
color: orange;
font: 256px monospace;
text-shadow: 10px 10px 5px #531;
}
</style>
<table width="100%" height="100%">
<td id="hours" align="center" valign="middle"></td>
</table>
<script>
var then = new Date("January 7 2014 17:13:00 GMT-0400 (EDT)");
var div = document.getElementById("hours");
setInterval(function() {
var now = Date.now();
var hours = ((then - now) / (1000 * 60 * 60));
hours = Math.round(hours * 100000) / 100000;
hours = hours.toString();
while(hours.length < 8)
hours = hours + "0";
hours = hours.substr(0, 8);
div.innerHTML = hours;
}, 10);
</script>