代码拉取完成,页面将自动刷新
同步操作将从 锅巴汉化/猫国建设者(Kittens Game) 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
const CACHE_NAME="likexiaCat";const locationUrl=location.origin+location.pathname.replace("serviceWorker.js","");const cdn="https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-y/";const strap="https://petercheney.github.io/strap/";const cdnCache=[cdn+"lz-string/1.4.1/lz-string.js",cdn+"jquery/3.6.0/jquery.min.js",cdn+"react/0.14.10/react.min.js",cdn+"dojo/1.6.0/dojo.xd.js",cdn+"systemjs/0.21.6/system.js",strap+"strapdown.js",strap+"strapdown.css",strap+"themes/litera.min.css",strap+"themes/bootstrap-responsive.min.css"];const version=7;const CACHE_LIST=["lf3-cdn-tos.bytecdntp.com",location.host,"petercheney.github.io"];self.addEventListener("install",e=>{e.waitUntil(caches.open("cdn").then(e=>{return e.addAll(cdnCache)}).then(()=>{return self.skipWaiting()}))});self.addEventListener("activate",e=>{e.waitUntil(caches.open(CACHE_NAME).then(function(e){return e.delete(new Request(locationUrl+"index.html"),{ignoreSearch:true}).then(()=>{return e.delete(new Request(locationUrl),{ignoreSearch:true})})}).then(()=>{caches.open("cdn").then(e=>{return e.addAll(cdnCache)}).then(()=>{return self.clients.claim()})}))});self.addEventListener("fetch",function(e){let r=e.request;let t=r.url;let s=new URL(t);let n=t.includes("server.json");let c=t.includes("build.version.json");let i=CACHE_LIST.indexOf(s.host);if(i>-1){e.respondWith(caches.match(r,{ignoreSearch:c||n}).then(function(n,e){let t=true;if(n){if(!navigator.onLine){return n}if(s.search){if(c){t=false}}if(t){return n}}return fetch(r,{cache:"no-cache"}).then(function(e){if(c&&e.status===404){return n}if(!e||e.status!==200||e.type!=="basic"){return e}let t=e.clone();caches.open(CACHE_NAME).then(function(e){return e.delete(r,{ignoreSearch:true}).then(()=>{return e.put(r,t)})});return e}).catch(()=>{if(n){return n}})}))}});self.addEventListener("error",e=>{console.log(e)});
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。