mirror of
https://gitlab.com/lecarore/breakout71.git
synced 2025-04-24 05:56:14 -04:00
Build 29039851
This commit is contained in:
parent
2fdb74a433
commit
1c4f3d1451
9 changed files with 13 additions and 14 deletions
|
@ -1,5 +1,5 @@
|
|||
// The version of the cache.
|
||||
const VERSION = "29039830";
|
||||
const VERSION = "29039851";
|
||||
|
||||
// The name of the cache
|
||||
const CACHE_NAME = `breakout-71-${VERSION}`;
|
||||
|
@ -12,7 +12,7 @@ self.addEventListener("install", (event) => {
|
|||
event.waitUntil(
|
||||
(async () => {
|
||||
const cache = await caches.open(CACHE_NAME);
|
||||
cache.addAll(APP_STATIC_RESOURCES);
|
||||
await cache.addAll(APP_STATIC_RESOURCES);
|
||||
})(),
|
||||
);
|
||||
});
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
import version from "../data/version.json";
|
||||
if (
|
||||
"serviceWorker" in navigator
|
||||
// && window.location.search.includes("isPWA=true")
|
||||
"serviceWorker" in navigator &&
|
||||
window.location.href.endsWith("/index.html?isPWA=true")
|
||||
) {
|
||||
// @ts-ignore
|
||||
navigator.serviceWorker.register(new URL("sw-b71.js", import.meta.url));
|
||||
const url = new URL("sw-b71.js", import.meta.url);
|
||||
navigator.serviceWorker.register(url);
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
"29039830"
|
||||
"29039851"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue