mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-01-19 01:18:19 +08:00
📝 Docs: 修复旧 Vuepress 文档缓存问题 (#1077)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
1aba737cbd
commit
14b145b58d
@ -1,16 +1,14 @@
|
||||
navigator.serviceWorker.getRegistrations().then(function (e) {
|
||||
for (
|
||||
var r, i = e, t = Array.isArray(i), a = 0, i = t ? i : i[Symbol.iterator]();
|
||||
;
|
||||
|
||||
) {
|
||||
if (t) {
|
||||
if (a >= i.length) break;
|
||||
r = i[a++];
|
||||
} else {
|
||||
if ((a = i.next()).done) break;
|
||||
r = a.value;
|
||||
}
|
||||
r.unregister();
|
||||
}
|
||||
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…
Reference in New Issue
Block a user