This repository has been archived on 2022-10-14. You can view files and clone it, but cannot push or open issues or pull requests.
m/countdown.html
2021-08-03 21:46:34 -07: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>