mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-17 02:34:38 -05: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;
|
||||
|
||||
caches.delete('offline-cache' + cacheVersion)
|
||||
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);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (/[?&]autoplay=/.test(location.search)) {
|
||||
checkbox.checked = true;
|
||||
|
|
Loading…
Reference in a new issue