mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-23 00:37:49 +01:00
fix cache :3
This commit is contained in:
parent
a91feb61af
commit
d55e146e73
1 changed files with 15 additions and 3 deletions
|
@ -1686,9 +1686,21 @@ checkbox.addEventListener('change', function(e) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
var cacheVersion = 1;
|
if ('serviceWorker' in navigator) {
|
||||||
|
navigator.serviceWorker.getRegistrations().then(function(registrations) {
|
||||||
|
for (let registration of registrations) {
|
||||||
|
registration.unregister();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if ('caches' in window) {
|
||||||
|
caches.keys().then(function(cacheNames) {
|
||||||
|
cacheNames.forEach(function(cacheName) {
|
||||||
|
caches.delete(cacheName);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
caches.delete('offline-cache' + cacheVersion)
|
}
|
||||||
|
|
||||||
if (/[?&]autoplay=/.test(location.search)) {
|
if (/[?&]autoplay=/.test(location.search)) {
|
||||||
checkbox.checked = true;
|
checkbox.checked = true;
|
||||||
|
|
Loading…
Reference in a new issue