diff --git a/entab-js/example/index.html b/entab-js/example/index.html
index 35b06d6..9f86d0a 100644
--- a/entab-js/example/index.html
+++ b/entab-js/example/index.html
@@ -75,7 +75,7 @@
// set up service worker so this page can be installable
if ("serviceWorker" in navigator) {
window.addEventListener("load", function() {
- navigator.serviceWorker.register("/service-worker.js");
+ navigator.serviceWorker.register("./service-worker.js");
});
}
diff --git a/entab-js/example/service-worker.js b/entab-js/example/service-worker.js
index 33aab90..224d292 100644
--- a/entab-js/example/service-worker.js
+++ b/entab-js/example/service-worker.js
@@ -1,7 +1,7 @@
self.addEventListener('install', evt => {
evt.waitUntil(
caches.open('entab').then(cache => {
- return cache.add('/index.html').then(() => self.skipWaiting());
+ return cache.add('./index.html').then(() => self.skipWaiting());
})
)
});
@@ -10,10 +10,10 @@ self.addEventListener('activate', evt => {
evt.waitUntil(self.clients.claim());
});
-self.addEventListener("fetch", evt => {
+self.addEventListener('fetch', evt => {
// fix for the bug here: https://bugs.chromium.org/p/chromium/issues/detail?id=823392
- if (evt.request.cache === "only-if-cached" && evt.request.mode !== "same-origin") {
- return
+ if (evt.request.cache === 'only-if-cached' && evt.request.mode !== 'same-origin') {
+ return;
}
evt.respondWith(