1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-09-15 18:57:04 +00:00

Rename service worker script to avoid being blocked by uBlock

This commit is contained in:
Frédéric Guillot 2020-09-23 20:20:31 -07:00
parent eb026ae4ac
commit 75b11d5744
6 changed files with 10 additions and 10 deletions

View file

@ -0,0 +1,14 @@
self.addEventListener("fetch", (event) => {
if (event.request.url.includes("/feed/icon/")) {
event.respondWith(
caches.open("feed_icons").then((cache) => {
return cache.match(event.request).then((response) => {
return response || fetch(event.request).then((response) => {
cache.put(event.request, response.clone());
return response;
});
});
})
);
}
});