Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
amethystnetwork-dev
GitHub Repository: amethystnetwork-dev/Incognito
Path: blob/main/static/uv.sw-handler.js
917 views
1
importScripts('/lcl/index.js');
2
importScripts('/uv/uv.bundle.js');
3
importScripts('/uv/uv.config.js');
4
importScripts(__uv$config.sw || '/uv/uv.sw.js');
5
6
Object.defineProperty(self, "crossOriginIsolated", { value: true }); // firefox fix
7
8
const sw = new UVServiceWorker();
9
10
self.addEventListener('fetch', event => {
11
if(event.request.url.startsWith(location.origin + __uv$config.prefix)) return event.respondWith(sw.fetch(event));
12
});
13