Make the clock page prettier (as in, with the prettier tool, not UI)

pull/237/head
ElementalAlchemist 3 years ago committed by Mike Lang
parent 3fe2848e60
commit a0d2dc99e1

@ -1,19 +1,17 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8" />
<title>Stream Time</title> <title>Stream Time</title>
<style type="text/css"> <style type="text/css">
#clock { #clock {
margin-bottom: 3px; margin-bottom: 3px;
} }
</style> </style>
</head> </head>
<body> <body>
<div id="clock"></div> <div id="clock"></div>
<div> <div><input type="number" id="delay" value="10" min="0" /> seconds of delay</div>
<input type="number" id="delay" value="10" min="0"> seconds of delay
</div>
<script type="text/javascript"> <script type="text/javascript">
const BUS_START_TIME = 1605290400; const BUS_START_TIME = 1605290400;
@ -22,11 +20,11 @@
if (isNaN(delay)) { if (isNaN(delay)) {
delay = 0; delay = 0;
} }
let time = (new Date().getTime()) / 1000 - delay - BUS_START_TIME; let time = new Date().getTime() / 1000 - delay - BUS_START_TIME;
let sign = ""; let sign = "";
if (time < 0) { if (time < 0) {
time = -time time = -time;
sign = "-"; sign = "-";
} }
@ -46,5 +44,5 @@
setInterval(updateClock, 1000); setInterval(updateClock, 1000);
</script> </script>
</body> </body>
</html> </html>

Loading…
Cancel
Save