oh this how how fetch worked right
This commit is contained in:
parent
d1c78badc4
commit
12b592f265
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue