mirror of
https://github.com/nonebot/nonebot2.git
synced 2024-12-01 01:25:07 +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));
|
|
});
|
|
});
|