diff --git a/assets/JsStuff/manifest.webmanifest b/assets/JsStuff/manifest.webmanifest index b238d2b..5a599fb 100644 --- a/assets/JsStuff/manifest.webmanifest +++ b/assets/JsStuff/manifest.webmanifest @@ -1,14 +1,14 @@ { "name": "Tinder for pokemons 2022", "short_name": "Pokinder", - "start_url": "/es2-2022-2023/rhmr/PokemonTinder/index.html", - "id": "/es2-2022-2023/rhmr/PokemonTinder/index.html", + "start_url": "/PokemonTinder/", + "id": "/PokemonTinder/", "display": "fullscreen", "theme_color": "red", "background_color": "black", "icons": [ { - "src": "/es2-2022-2023/rhmr/PokemonTinder/assets/img/Icon2.png", + "src": "/PokemonTinder/assets/img/Icon2.png", "sizes": "144x144", "type": "image/png" } diff --git a/index.html b/index.html index b7fe0ec..53f34c0 100644 --- a/index.html +++ b/index.html @@ -25,7 +25,7 @@ if ('serviceWorker' in navigator) { // Register a service worker hosted at the root of the // site using the default scope. - navigator.serviceWorker.register('/es2-2022-2023/rhmr/PokemonTinder/sw.js').then( + navigator.serviceWorker.register('/PokemonTinder/sw.js').then( (registration) => { console.log('Service worker registration succeeded:', registration) }, diff --git a/sw.js b/sw.js index 07e9e22..bc199f2 100644 --- a/sw.js +++ b/sw.js @@ -21,7 +21,7 @@ self.addEventListener("fetch", event => { ); }); -/* + function cache(request, response) { if (response.type === "error" || response.type === "opaque") { return Promise.resolve(); // do not put in cache network errors @@ -31,7 +31,7 @@ function cache(request, response) { .open(CACHE_NAME) .then(cache => cache.put(request, response.clone())); } -*/ + const CACHE_NAME = "V2";