mirror of
https://github.com/Buriburizaem0n/nezha-dash-v1.git
synced 2026-02-04 04:30:07 +00:00
fix: remove service worker
This commit is contained in:
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));
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user