mirror of
https://github.com/nonebot/nonebot2.git
synced 2024-11-25 09:35:03 +08:00
14b145b58d
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
15 lines
338 B
JavaScript
15 lines
338 B
JavaScript
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));
|
|
});
|
|
});
|