This commit is contained in:
MotorTruck1221 2024-03-10 03:42:22 -06:00
parent 11dce272a4
commit a3094b3923
No known key found for this signature in database
GPG key ID: 06901A625432AC21

View file

@ -16,6 +16,7 @@ localforage.config({
description: "Nebula Config for things reliant on IndexedDB" description: "Nebula Config for things reliant on IndexedDB"
}); });
const uv = new UVServiceWorker();
const dynPromise = new Promise(async (resolve) => { const dynPromise = new Promise(async (resolve) => {
try { try {
const bare = const bare =
@ -44,18 +45,17 @@ self.addEventListener("fetch", (event) => {
})() })()
); );
} else if ( } else if (
event.request.url.startsWith(location.origin + self.__uv$config.prefix) event.request.url.startsWith(location.origin + __uv$config.prefix)
) { ) {
event.respondWith( event.respondWith(
(async function () { (async function () {
return await self.uv.fetch(event); return await uv.fetch(event);
})() })()
); )}
} else { else {
event.respondWith( event.respondWith(
(async function () { (async function () {
return await fetch(event.request); return await fetch(event.request);
})() })()
); )}
}
}); });