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:
parent
eb026ae4ac
commit
75b11d5744
6 changed files with 10 additions and 10 deletions
14
ui/static/js/service_worker.js
Normal file
14
ui/static/js/service_worker.js
Normal 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;
|
||||
});
|
||||
});
|
||||
})
|
||||
);
|
||||
}
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue