aboutsummaryrefslogtreecommitdiff
path: root/static/service-worker/index.js
diff options
context:
space:
mode:
authorNathan Reiner <nathan@nathanreiner.xyz>2026-05-20 10:16:50 +0200
committerNathan Reiner <nathan@nathanreiner.xyz>2026-05-20 10:16:50 +0200
commit44445734ba4a0f05564f808c2fd34a7f23c6fafb (patch)
tree3bd22add718620cbf931286f55137bcc666100be /static/service-worker/index.js
parent95ae9f15e1db335a7f8358d811ea37e2c89dd10f (diff)
Let's do a rewrite!
Created project structure and changed `build.zig` and added licence.
Diffstat (limited to 'static/service-worker/index.js')
-rw-r--r--static/service-worker/index.js21
1 files changed, 0 insertions, 21 deletions
diff --git a/static/service-worker/index.js b/static/service-worker/index.js
deleted file mode 100644
index cff4b95..0000000
--- a/static/service-worker/index.js
+++ /dev/null
@@ -1,21 +0,0 @@
-export const register = async () => {
- if (!'serviceWorker' in navigator) {
- console.warn('service worker not supported by browser');
- return;
- }
-
- try {
- const registration = await navigator.serviceWorker.register("/service-worker/worker.js", {
- scope: "/",
- });
- if (registration.installing) {
- console.log("Service worker installing");
- } else if (registration.waiting) {
- console.log("Service worker installed");
- } else if (registration.active) {
- console.log("Service worker active");
- }
- } catch (error) {
- console.error(`Registration failed with ${error}`);
- }
-}