nonebot2/website/static/service-worker.js

15 lines
338 B
JavaScript
Raw Normal View History

self.addEventListener("install", function (e) {
self.skipWaiting();
});
2022-01-15 21:27:43 +08:00
self.addEventListener("activate", function (e) {
self.registration
.unregister()
.then(function () {
return self.clients.matchAll();
})
.then(function (clients) {
clients.forEach((client) => client.navigate(client.url));
});
2022-01-15 21:27:43 +08:00
});