mirror of
https://gitlab.com/lecarore/breakout71.git
synced 2025-04-24 14:06:16 -04:00
Pause when tab is hidden, using visibility change api
This commit is contained in:
parent
1a56b5f1d1
commit
33d74e8c84
68 changed files with 7290 additions and 6933 deletions
4
dist/sw-b71.js
vendored
4
dist/sw-b71.js
vendored
|
@ -1,5 +1,5 @@
|
|||
// The version of the cache.
|
||||
const VERSION = '29032991';
|
||||
const VERSION = "29033834";
|
||||
// The name of the cache
|
||||
const CACHE_NAME = `breakout-71-${VERSION}`;
|
||||
// The static resources that the app needs to function.
|
||||
|
@ -24,7 +24,7 @@ self.addEventListener("activate", (event)=>{
|
|||
})());
|
||||
});
|
||||
self.addEventListener("fetch", (event)=>{
|
||||
if (event.request.mode === "navigate" && event.request.url.endsWith('/index.html?isPWA=true')) {
|
||||
if (event.request.mode === "navigate" && event.request.url.endsWith("/index.html?isPWA=true")) {
|
||||
event.respondWith(caches.match("/"));
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue