diff options
Diffstat (limited to 'assets')
-rw-r--r-- | assets/index.js | 11 | ||||
-rw-r--r-- | assets/sw.js | 8 |
2 files changed, 9 insertions, 10 deletions
diff --git a/assets/index.js b/assets/index.js index f2f8def..8ee4964 100644 --- a/assets/index.js +++ b/assets/index.js @@ -5,8 +5,9 @@ document.getElementById("nav-toogle").addEventListener("click", async() => { } return false; }); -window.addEventListener("load", async() => { - if ("serviceWorker" in navigator) { - navigator.serviceWorker.register("/sw.js", { type: "module" }); - } -});
\ No newline at end of file + +//window.addEventListener("load", async() => { +// if ("serviceWorker" in navigator) { +// navigator.serviceWorker.register("/sw.js", { type: "module" }); +// } +//}); diff --git a/assets/sw.js b/assets/sw.js index e6b6538..0f2a4de 100644 --- a/assets/sw.js +++ b/assets/sw.js @@ -1,6 +1,4 @@ -import metadata from "/assets/metadata.js" - -const data = metadata() +import timestamp from "/assets/metadata.js" const sw_cache = { offline: "/offline.html", @@ -11,7 +9,7 @@ const sw_cache = { "/favicon/icon.svg", "/offline.html", ], - store: data.version, + store: timestamp, }; (function() { @@ -58,4 +56,4 @@ const sw_cache = { })(); })()); }); -})();
\ No newline at end of file +})(); |