testing to see if the easy answer works

This commit is contained in:
Pagwin 2025-08-22 13:44:38 -04:00
parent 25a76f76a6
commit d1c78badc4

View file

@ -1,3 +1,10 @@
self.addEventListener("fetch", event =>{
event.respondWith(new Response("hi"));
event.respondWith((async ()=>{
const resp = await fetch(event.request);
const body = await resp.body.text();
new Response(body.replace("<body>", '<body class="toggled">'), {
...resp
});
})());
})