summaryrefslogtreecommitdiff
path: root/src/scripts/main.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/scripts/main.js')
-rw-r--r--src/scripts/main.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/scripts/main.js b/src/scripts/main.js
new file mode 100644
index 0000000..e4efee0
--- /dev/null
+++ b/src/scripts/main.js
@@ -0,0 +1,9 @@
+if ("serviceWorker" in navigator) {
+ window.addEventListener("load", function () {
+
+ navigator.serviceWorker
+ .register("scripts/service-worker.js")
+ .then(res => console.log("service worker registered"))
+ .catch(err => console.log("service worker not registered", err))
+ })
+} \ No newline at end of file