Update service-worker location
Fix service worker not found issue when running the application from a different folder other than domain root.
This commit is contained in:
parent
84dd9bab1c
commit
7d5b75e78c
File diff suppressed because one or more lines are too long
|
@ -68,11 +68,11 @@ self.__precacheManifest = [
|
|||
"url": "flags/ir.svg"
|
||||
},
|
||||
{
|
||||
"revision": "fc5025122339e41903ba",
|
||||
"revision": "23a22250de06d1793dc4",
|
||||
"url": "app.js"
|
||||
},
|
||||
{
|
||||
"revision": "fc5025122339e41903ba",
|
||||
"revision": "23a22250de06d1793dc4",
|
||||
"url": "app.css"
|
||||
}
|
||||
];
|
|
@ -14,7 +14,7 @@
|
|||
importScripts("https://storage.googleapis.com/workbox-cdn/releases/3.4.1/workbox-sw.js");
|
||||
|
||||
importScripts(
|
||||
"precache-manifest.272e05401f2b6535c2c0bd13398d615f.js"
|
||||
"precache-manifest.9fb68aa2f4c1d3847817b423aa5ac56d.js"
|
||||
);
|
||||
|
||||
/**
|
||||
|
|
|
@ -145,7 +145,7 @@ webui.directive("textarea", directiveTextarea);
|
|||
if ("serviceWorker" in navigator && location.protocol === "https:") {
|
||||
window.addEventListener("load", () => {
|
||||
navigator.serviceWorker
|
||||
.register("/service-worker.js")
|
||||
.register("service-worker.js")
|
||||
.then(registration => {
|
||||
console.log("SW registered: ", registration);
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue
Block a user