mirror of
https://github.com/woodchen-ink/nezha-dash-v1.git
synced 2025-07-18 17:41:56 +08:00
fix: remove service worker
This commit is contained in:
parent
2be0abcded
commit
05bb295349
18
public/sw.js
Normal file
18
public/sw.js
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
/**
|
||||||
|
* Self-Destroy service worker
|
||||||
|
*/
|
||||||
|
|
||||||
|
self.addEventListener("install", function (e) {
|
||||||
|
self.skipWaiting();
|
||||||
|
});
|
||||||
|
|
||||||
|
self.addEventListener("activate", function (e) {
|
||||||
|
self.registration
|
||||||
|
.unregister()
|
||||||
|
.then(function () {
|
||||||
|
return self.clients.matchAll();
|
||||||
|
})
|
||||||
|
.then(function (clients) {
|
||||||
|
clients.forEach((client) => client.navigate(client.url));
|
||||||
|
});
|
||||||
|
});
|
Loading…
x
Reference in New Issue
Block a user