mirror of
https://github.com/classilla/tenfourfox.git
synced 2024-09-07 21:54:29 +00:00
12 lines
390 B
JavaScript
12 lines
390 B
JavaScript
self.addEventListener("fetch", function(event) {
|
|
if (event.request.url.indexOf("index.html") >= 0) {
|
|
event.respondWith(fetch("realindex.html"));
|
|
} else if (event.request.url.indexOf("image-20px.png") >= 0) {
|
|
if (event.request.url.indexOf("https://") == 0) {
|
|
event.respondWith(fetch("image-40px.png"));
|
|
} else {
|
|
event.respondWith(Response.error());
|
|
}
|
|
}
|
|
});
|