blob: 74b9ed23badc3b4660f8b15c2a1d24a6f7eaff94 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
self.addEventListener("fetch", function (event) {
if (event.request.url.includes("index.html")) {
event.respondWith(fetch("realindex.html"));
} else if (event.request.url.includes("image-20px.png")) {
if (event.request.url.indexOf("https://") == 0) {
event.respondWith(fetch("image-40px.png"));
} else {
event.respondWith(Response.error());
}
}
});
|