oh this how how fetch worked right

This commit is contained in:
Pagwin 2025-08-22 13:54:31 -04:00
parent d1c78badc4
commit 12b592f265

View file

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