move service worker
This commit is contained in:
parent
04f6eaf5dc
commit
58389623cc
@ -260,5 +260,5 @@ window.onbeforeunload = function(event) {
|
|||||||
|
|
||||||
|
|
||||||
if ('serviceWorker' in navigator) {
|
if ('serviceWorker' in navigator) {
|
||||||
navigator.serviceWorker.register('service-worker.js');
|
navigator.serviceWorker.register('js/service-worker.js');
|
||||||
}
|
}
|
@ -16,7 +16,7 @@ Copyright 2015, 2019, 2020 Google LLC. All Rights Reserved.
|
|||||||
const OFFLINE_VERSION = 1;
|
const OFFLINE_VERSION = 1;
|
||||||
const CACHE_NAME = "offline";
|
const CACHE_NAME = "offline";
|
||||||
// Customize this with a different URL if needed.
|
// Customize this with a different URL if needed.
|
||||||
const OFFLINE_URL = "index.html";
|
const OFFLINE_URL = "../index.html";
|
||||||
|
|
||||||
self.addEventListener("install", (event) => {
|
self.addEventListener("install", (event) => {
|
||||||
event.waitUntil(
|
event.waitUntil(
|
Loading…
x
Reference in New Issue
Block a user