From e3eaf62842087028e54c1a6008c8dfa7b3f45f14 Mon Sep 17 00:00:00 2001 From: altaf-creator <64111012+altaf-creator@users.noreply.github.com> Date: Thu, 4 May 2023 19:46:05 +0700 Subject: PWA Update - attempt 3.2 --- src/scripts/service-worker.js | 43 ++++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 21 deletions(-) (limited to 'src/scripts/service-worker.js') diff --git a/src/scripts/service-worker.js b/src/scripts/service-worker.js index 22d8452..6e8f8db 100644 --- a/src/scripts/service-worker.js +++ b/src/scripts/service-worker.js @@ -1,27 +1,28 @@ const staticQuran = "quran-all"; const assets = [ - "/", - "/index.html", - "/src/index.html", - "/src/sura.html", - "/src/attribution.html", - "/src/styles/style.css", - "/src/styles/css/fontawesome.css", - "/src/styles/css/brands.css", - "/src/styles/css/solid.css", - "/src/styles/webfonts/fa-brands-400.ttf", - "/src/styles/webfonts/fa-brands-400.woff2", - "/src/styles/webfonts/fa-solid-900.ttf", - "/src/styles/webfonts/fa-solid-900.woff2", - "/src/styles/css/solid.css", - "/src/data/en.sahih.xml", - "/src/data/id.indonesian.xml", - "/src/data/quran-data.xml", - "/src/data/quran-uthmani.xml", - "/src/scripts/main.js", - "/src/scripts/quran.js", - "/src/scripts/sura-list.js", + "../../", + "../../index.html", + "../src/index.html", + "../src/sura.html", + "../src/attribution.html", + "../src/styles/style.css", + "../src/styles/css/fontawesome.css", + "../src/styles/css/brands.css", + "../src/styles/css/solid.css", + "../src/styles/webfonts/fa-brands-400.ttf", + "../src/styles/webfonts/fa-brands-400.woff2", + "../src/styles/webfonts/fa-solid-900.ttf", + "../src/styles/webfonts/fa-solid-900.woff2", + "../src/styles/css/solid.css", + "../src/data/en.sahih.xml", + "../src/data/id.indonesian.xml", + "../src/data/quran-data.xml", + "../src/data/quran-uthmani.xml", + "main.js", + "quran.js", + "sura-list.js", ]; + self.addEventListener("install", installEvent => { installEvent.waitUntil( caches.open(staticQuran).then(cache => { -- cgit v1.2.3