🔀 Merge pull request #658

Docs: disable service worker globally
This commit is contained in:
Ju4tCode 2022-01-05 17:46:53 +08:00 committed by GitHub
commit 159fc12fb9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View File

@ -22,6 +22,8 @@ const config = {
"zh-Hans": { label: "简体中文" },
},
},
scripts: ["/unregister-sw.js"],
presets: [
[

View File

@ -0,0 +1 @@
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()}});