move service worker

This commit is contained in:
Adrien MALINGREY 2024-04-29 17:51:04 +02:00
parent 04f6eaf5dc
commit 58389623cc
2 changed files with 2 additions and 2 deletions

View File

@ -260,5 +260,5 @@ window.onbeforeunload = function(event) {
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('service-worker.js');
navigator.serviceWorker.register('js/service-worker.js');
}

View File

@ -16,7 +16,7 @@ Copyright 2015, 2019, 2020 Google LLC. All Rights Reserved.
const OFFLINE_VERSION = 1;
const CACHE_NAME = "offline";
// Customize this with a different URL if needed.
const OFFLINE_URL = "index.html";
const OFFLINE_URL = "../index.html";
self.addEventListener("install", (event) => {
event.waitUntil(