Skip to content
Snippets Groups Projects

Resolve "Drop unused functions in serviceworker"

Merged Hangzhi Yu requested to merge 330-drop-unused-functions-in-serviceworker into master
1 file
+ 0
17
Compare changes
  • Side-by-side
  • Inline
@@ -5,23 +5,6 @@ const CACHE = 'aleksis-cache';
const offlineFallbackPage = 'offline/';
function pathComparer(requestUrl, pathRegEx) {
return requestUrl.match(new RegExp(pathRegEx));
}
function comparePaths(requestUrl, pathsArray) {
if (requestUrl) {
for (let index = 0; index < pathsArray.length; index++) {
const pathRegEx = pathsArray[index];
if (pathComparer(requestUrl, pathRegEx)) {
return true;
}
}
}
return false;
}
self.addEventListener("install", function (event) {
console.log("[AlekSIS PWA] Install Event processing.");
Loading