From 8b86de049b5197264bfb218ca69dfa52671ad0b0 Mon Sep 17 00:00:00 2001 From: OctoSpacc Date: Sat, 27 Apr 2024 10:31:35 +0200 Subject: [PATCH] fix --- static/ServiceWorker.js | 8 +++++++- static/index.html | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/static/ServiceWorker.js b/static/ServiceWorker.js index 93f9c81..3d4f2a2 100644 --- a/static/ServiceWorker.js +++ b/static/ServiceWorker.js @@ -3,7 +3,13 @@ const cachables = { "//": "networkFirst", }; -const checkUrlCaching = (url) => (cachables[url] || cachables[`/${url.split('://').slice(1).join('://').split('/')[1]}/`]); +const checkUrlCaching = (url) => { + let caching = (cachables[url] || cachables[`/${url.split('://').slice(1).join('://').split('/')[1]}/`]); + if (caching === undefined) { + caching = cachables['//']; + }; + return caching; +}; const putResponseInCache = (request, response) => { if (response.ok) { diff --git a/static/index.html b/static/index.html index 795252a..cf0e0c0 100644 --- a/static/index.html +++ b/static/index.html @@ -26,10 +26,10 @@
At the moment, it's still kind of an humble hub...
(But every once in a while I do make a new link appear below!)
-
+

-

Site Theme Song: Spirit of Famiclone Selection Menu

+

Theme Song: Spirit of Famiclone Selection Menu