📝 Docs: 修复旧 Vuepress 文档缓存问题 (#1077)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
StarHeart 2022-07-02 10:19:51 +08:00 committed by GitHub
parent 1aba737cbd
commit 14b145b58d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,16 +1,14 @@
navigator.serviceWorker.getRegistrations().then(function (e) { self.addEventListener("install", function (e) {
for ( self.skipWaiting();
var r, i = e, t = Array.isArray(i), a = 0, i = t ? i : i[Symbol.iterator](); });
;
self.addEventListener("activate", function (e) {
) { self.registration
if (t) { .unregister()
if (a >= i.length) break; .then(function () {
r = i[a++]; return self.clients.matchAll();
} else { })
if ((a = i.next()).done) break; .then(function (clients) {
r = a.value; clients.forEach((client) => client.navigate(client.url));
} });
r.unregister();
}
}); });