mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-13 06:20:02 -04:00
make scramjet.init not register service worker
This commit is contained in:
parent
699f4baa6f
commit
e9ba8eb952
6 changed files with 10 additions and 21 deletions
10
static/sw.js
10
static/sw.js
|
@ -14,17 +14,11 @@ importScripts(
|
|||
|
||||
const scramjet = new ScramjetServiceWorker();
|
||||
|
||||
async function handleRequest(event) {
|
||||
self.addEventListener("fetch", async (event) => {
|
||||
await scramjet.loadConfig();
|
||||
if (scramjet.route(event)) {
|
||||
return scramjet.fetch(event);
|
||||
event.respondWith(scramjet.fetch(event));
|
||||
}
|
||||
|
||||
return fetch(event.request);
|
||||
}
|
||||
|
||||
self.addEventListener("fetch", (event) => {
|
||||
event.respondWith(handleRequest(event));
|
||||
});
|
||||
|
||||
let playgroundData;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue