diff --git a/pwabuilder-sw.js b/pwabuilder-sw.js index 866dde7c..ddca490d 100644 --- a/pwabuilder-sw.js +++ b/pwabuilder-sw.js @@ -173,11 +173,11 @@ function intercept(event) { // DEV: Electron uses the file:// protocol and hacks it to work with SW, but it has CORS issues when using the Fetch API to fetch local files, // so we must bypass it here if we're fetching a local file if (/^file:/i.test(event.request.url) && ! (regexpZIMUrlWithNamespace.test(event.request.url) && /\.zim\w{0,2}\//i.test(event.request.url))) return; - console.log('[SW] Service Worker ' + (event.request.method === "GET" ? 'intercepted ' : 'noted ') + event.request.url, event.request.method); + console.debug('[SW] Service Worker ' + (event.request.method === "GET" ? 'intercepted ' : 'noted ') + event.request.url, event.request.method); if (event.request.method !== "GET") return; event.respondWith( fromCache(event.request).then(function (response) { - console.log('[SW] Supplying ' + event.request.url + ' from CACHE...'); + console.debug('[SW] Supplying ' + event.request.url + ' from CACHE...'); return response; }, function () { @@ -275,7 +275,7 @@ function intercept(event) { } return response; }).catch(function (error) { - console.log("[SW] Network request failed and no cache.", error); + console.debug("[SW] Network request failed and no cache.", error); }); } }