Spaces:
No application file
No application file
Download worker.js from Studytime171/lalit: direct link, hf CLI and curl.
- Browser
- Download file 750 Bytes
-
https://huggingface.co/spaces/Studytime171/lalit/resolve/refs%2Fpr%2F2/worker.js
- Command line
-
hf download hf://spaces/Studytime171/lalit@refs/pr/2/worker.js
-
curl -L -o worker.js https://huggingface.co/spaces/Studytime171/lalit/resolve/refs%2Fpr%2F2/worker.js
750 Bytes
| const filesToCache = [ | |
| "VirtualXP.htm", | |
| "VirtualXP.iso", | |
| "VirtualXP.js", | |
| "VirtualXP.json", | |
| "VirtualXP.png", | |
| "VirtualXP.wasm", | |
| "VirtualXPBIOS.bin", | |
| "VirtualXPFavIcon_16x16.png", | |
| "VirtualXPFavIcon_192x192.png", | |
| "VirtualXPFavIcon_512x512.png", | |
| "VirtualXPLoader.js", | |
| "VirtualXPShare.png", | |
| "VirtualXPVGA.bin" | |
| ]; | |
| const staticCacheName = "virtualxp-v1"; | |
| self.addEventListener("install", event => { | |
| event.waitUntil( | |
| caches.open(staticCacheName) | |
| .then(cache => { | |
| return cache.addAll(filesToCache); | |
| }) | |
| ); | |
| }); | |
| self.addEventListener("fetch", event => { | |
| event.respondWith( | |
| caches.match(event.request) | |
| .then(response => { | |
| if (response) { | |
| return response; | |
| } | |
| return fetch(event.request) | |
| }).catch(error => { | |
| }) | |
| ); | |
| }); |