]> Devi Nivas Git - simplescripts.git/commitdiff
Add time.html source code
authorAdvaith Menon <noreply-git@bp4k.net>
Tue, 6 Jan 2026 15:10:44 +0000 (20:40 +0530)
committerAdvaith Menon <noreply-git@bp4k.net>
Tue, 6 Jan 2026 15:10:44 +0000 (20:40 +0530)
* Add clock source code

html/PIA/time.html [new file with mode: 0644]

diff --git a/html/PIA/time.html b/html/PIA/time.html
new file mode 100644 (file)
index 0000000..b9966b3
--- /dev/null
@@ -0,0 +1,56 @@
+<html>
+    <head>
+        <meta charset="utf-8">
+        <meta name="viewport" content="width=device-width,initial-scale=1">
+        <link rel="stylesheet" href="https://d191h8mmxs3x6q.cloudfront.net/madvaith1/static/index-style.css">
+<style>
+body {
+    background-color: black;
+}
+h1 {
+    font-family:'Helvetica', sans-serif;
+    font-size: 14vw;
+    color: white;
+}
+</style>
+        <title>Enable JavaScript | Devi Nivas PIA Current Time</title>
+    </head>
+    <body style="width:100%;height:100%;display:table;">
+        <div
+            style="text-align:center;display:table-cell;vertical-align:middle;">
+            <h1 id="time">Enable JavaScript</h1>
+        </div>
+
+        <script type="text/javascript">
+            (function(window, document, undefined) {
+                setInterval(
+                    function (event) {
+                        document.getElementById("time").innerHTML =
+                            new Date().toLocaleTimeString();
+                        document.title =
+                            new Date().toLocaleTimeString() + " | Devi Nivas PIA Current Time";
+                    },
+                    500);
+
+                document.body.addEventListener('click', function() {
+                    console.log("hi");
+                    if (document.fullscreenElement != document.body) {
+                        document.body.requestFullscreen();
+                    } else {
+                        document.exitFullscreen();
+                        console.log("exit");
+                    }
+                });
+                document.addEventListener('DOMContentLoaded', function () {
+                    const vis = localStorage.getItem('dn-instr-v1');
+
+                    localStorage.setItem('dn-instr-v1', true);
+
+                    if (vis == null) alert("Instructions:\nClick anywhere to toggle fullscreen.");
+                });
+            })(window, document);
+
+
+        </script>
+    </body>
+</html>