about summary refs log tree commit diff stats
path: root/js/lut-cam/lut.js
diff options
context:
space:
mode:
authorelioat <elioat@tilde.institute>2024-08-18 20:27:10 -0400
committerelioat <elioat@tilde.institute>2024-08-18 20:27:10 -0400
commite78bf7a21ad8dc2971e061eb01fd335739997c31 (patch)
treeaeb77a02ceee580d7c9f9c03019b84c2b39498a5 /js/lut-cam/lut.js
parentcef4955de167d20f38588da594ecd21ea663f028 (diff)
downloadtour-e78bf7a21ad8dc2971e061eb01fd335739997c31.tar.gz
*
Diffstat (limited to 'js/lut-cam/lut.js')
-rw-r--r--js/lut-cam/lut.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/js/lut-cam/lut.js b/js/lut-cam/lut.js
index 0bd7dae..ff2bb41 100644
--- a/js/lut-cam/lut.js
+++ b/js/lut-cam/lut.js
@@ -157,3 +157,14 @@ captureButton.addEventListener('click', () => {
     link.href = canvas.toDataURL('image/png');
     link.click();
 });
+
+if ('serviceWorker' in navigator) {
+    window.addEventListener('load', () => {
+        navigator.serviceWorker.register('/service-worker.js')
+        .then(registration => {
+            console.log('ServiceWorker registration successful with scope: ', registration.scope);
+        }, err => {
+            console.log('ServiceWorker registration failed: ', err);
+        });
+    });
+}
\ No newline at end of file