about summary refs log tree commit diff stats
path: root/js/pico-cam/index.html
diff options
context:
space:
mode:
authorelioat <elioat@tilde.institute>2024-06-30 18:30:33 -0400
committerelioat <elioat@tilde.institute>2024-06-30 18:30:33 -0400
commitf29758cfe8e233fa9d011f3eb7083123bfd40cd5 (patch)
tree8698edceae1f1fb467b533343f1316a53b7cf11d /js/pico-cam/index.html
parentbcdc7c3b2b74cdce311d569c78fc2adee0a66b12 (diff)
downloadtour-f29758cfe8e233fa9d011f3eb7083123bfd40cd5.tar.gz
*
Diffstat (limited to 'js/pico-cam/index.html')
-rw-r--r--js/pico-cam/index.html14
1 files changed, 14 insertions, 0 deletions
diff --git a/js/pico-cam/index.html b/js/pico-cam/index.html
index b524b39..7b8798a 100644
--- a/js/pico-cam/index.html
+++ b/js/pico-cam/index.html
@@ -78,5 +78,19 @@
         <canvas id="ditheredOutput"></canvas>
     </div>
     <script src="video.js"></script>
+    <script>
+        // Check if Service Workers are supported
+        if ('serviceWorker' in navigator) {
+            window.addEventListener('load', function() {
+                navigator.serviceWorker.register('service-worker.js').then(function(registration) {
+                    // Registration was successful
+                    console.log('ServiceWorker registration successful with scope: ', registration.scope);
+                }, function(err) {
+                    // Registration failed
+                    console.log('ServiceWorker registration failed: ', err);
+                });
+            });
+        }
+    </script>
 </body>
 </html>
\ No newline at end of file