blob: e97d062050db52f3956bb3a4e21bfebd76f0436a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
self.addEventListener("fetch", function(event) {
var resource = event.request.url.split('/').pop();
event.waitUntil(
clients.matchAll()
.then(clients => {
clients.forEach(client => {
if (client.url.includes("plugins.html")) {
client.postMessage({context: event.request.context,
resource: resource});
}
});
})
);
});
|