diff --git a/index.html b/index.html index 61c0231..b4f46f2 100644 --- a/index.html +++ b/index.html @@ -53,21 +53,5 @@

JavaScript support is required to run this app.

- diff --git a/src/index.ts b/src/index.ts index 1ed2daa..c888890 100644 --- a/src/index.ts +++ b/src/index.ts @@ -12,3 +12,15 @@ const defaultTabs = [ defaultTabs.forEach((tab) => { manager.openTab(tab.page, tab.active); }); + +if ("serviceWorker" in navigator) { + const x = "sw.js"; + navigator.serviceWorker + .register(x) + .then((registration) => { + console.log("Registration successful, scope is:", registration.scope); + }) + .catch((error) => { + console.log("Service worker registration failed, error:", error); + }); +}