From 97a5ae55990f566abc5c77358d71b3ff845b9c49 Mon Sep 17 00:00:00 2001 From: aryanpingle <49340972+aryanpingle@users.noreply.github.com> Date: Sat, 28 Sep 2024 11:34:55 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20aryanpin?= =?UTF-8?q?gle/Runic@a0d1ad2f81a7fed2d9cea3199b928b00e8308b01=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- service-worker.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service-worker.js b/service-worker.js index c57c6a1..da46b8a 100644 --- a/service-worker.js +++ b/service-worker.js @@ -1 +1 @@ -var a=self.registration.scope.includes("127.0.0.1")||self.registration.scope.includes("localhost"),o=(e,t="rgb(128, 128, 128)")=>a&&console.log(`%c${e}`,`color: black !important; background-color: ${t};`),u=a,f="runic-cache-1",s=null;self.addEventListener("install",e=>{o("Service Worker Installed"),self.skipWaiting()});self.addEventListener("activate",async e=>{o("Service Worker Activated"),e.waitUntil((async()=>{await clients.claim()})())});self.addEventListener("fetch",e=>{e.respondWith(u?d(e):fetch(e.request))});function h(e){return!!(e.includes("googletagmanager.com/gtag")||e.includes("ipa_dict.json")||e.includes("fonts.googleapis.com"))}async function d(e){let t=e.request;if(t.url.includes("google-analytics.com"))return await fetch(t);if(s==null&&(s=await caches.open(f)),h(t.url)){let n=await s.match(t);return n===void 0?await fetch(t).then(c=>(i(t,c),c)):n}return await w(t)}function i(e,t){let n=t.clone();s.put(e,n)}async function g(e){let t=await fetch(e);return t.ok&&i(e,t),t}async function w(e){let t=new URL(e.url);t.search="",t.hash="";let n=t.toString(),c=new Request(n);try{return await g(c)}catch(l){let r=await s.match(c);if(r===void 0)throw l;return r}} +var a=self.registration.scope.includes("127.0.0.1")||self.registration.scope.includes("localhost"),o=(e,t="rgb(128, 128, 128)")=>a&&console.log(`%c${e}`,`color: black !important; background-color: ${t};`),u=!a,f="runic-cache-1",s=null;self.addEventListener("install",e=>{o("Service Worker Installed"),self.skipWaiting()});self.addEventListener("activate",async e=>{o("Service Worker Activated"),e.waitUntil((async()=>{await clients.claim()})())});self.addEventListener("fetch",e=>{e.respondWith(u?d(e):fetch(e.request))});function h(e){return!!(e.includes("googletagmanager.com/gtag")||e.includes("ipa_dict.json")||e.includes("fonts.googleapis.com"))}async function d(e){let t=e.request;if(t.url.includes("google-analytics.com"))return await fetch(t);if(s==null&&(s=await caches.open(f)),h(t.url)){let n=await s.match(t);return n===void 0?await fetch(t).then(c=>(i(t,c),c)):n}return await w(t)}function i(e,t){let n=t.clone();s.put(e,n)}async function g(e){let t=await fetch(e);return t.ok&&i(e,t),t}async function w(e){let t=new URL(e.url);t.search="",t.hash="";let n=t.toString(),c=new Request(n);try{return await g(c)}catch(l){let r=await s.match(c);if(r===void 0)throw l;return r}}