aboutsummaryrefslogtreecommitdiff
path: root/public/js
diff options
context:
space:
mode:
authorfloppydiskette <git@diskfloppy.me>2024-08-08 15:35:48 +0100
committerfloppydiskette <git@diskfloppy.me>2024-08-08 15:35:48 +0100
commit74bca7ac803aeea3d5091344b99520687e3a3bd1 (patch)
tree8a63a2341303daac4ac621f8f4962a81d684e88a /public/js
parent9900446d9590024c34f55a45055776a396fb694e (diff)
parent14d3ed966bbafbcb01182df26fbbe1d5a211f4c2 (diff)
Merge branch 'redesign'
Diffstat (limited to 'public/js')
-rw-r--r--public/js/liveClock.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/public/js/liveClock.js b/public/js/liveClock.js
new file mode 100644
index 0000000..07c9eae
--- /dev/null
+++ b/public/js/liveClock.js
@@ -0,0 +1,10 @@
+function time() {
+ var span = document.getElementById("clock");
+ var d = new Date();
+ var s = d.getSeconds();
+ var m = d.getMinutes();
+ var h = d.getHours();
+ span.textContent =
+ ("0" + h).substr(-2) + ":" + ("0" + m).substr(-2) + ":" + ("0" + s).substr(-2);
+}
+setInterval(time, 1000);