Spaces:
Running
Running
Download sw.js from sync2ai/phantom-caller-magic: direct link, hf CLI and curl.
- Browser
- Download file 624 Bytes
-
https://huggingface.co/spaces/sync2ai/phantom-caller-magic/resolve/main/sw.js
- Command line
-
hf download hf://spaces/sync2ai/phantom-caller-magic/sw.js
-
curl -L -o sw.js https://huggingface.co/spaces/sync2ai/phantom-caller-magic/resolve/main/sw.js
624 Bytes
| const CACHE_NAME = 'phantom-caller-v1'; | |
| const ASSETS = [ | |
| '/', | |
| '/index.html', | |
| '/style.css', | |
| '/script.js', | |
| '/components/navbar.js', | |
| '/components/footer.js', | |
| 'https://cdn.tailwindcss.com', | |
| 'https://unpkg.com/feather-icons', | |
| 'https://cdn.jsdelivr.net/npm/vanta@latest/dist/vanta.waves.min.js' | |
| ]; | |
| self.addEventListener('install', (event) => { | |
| event.waitUntil( | |
| caches.open(CACHE_NAME) | |
| .then((cache) => cache.addAll(ASSETS)) | |
| ); | |
| }); | |
| self.addEventListener('fetch', (event) => { | |
| event.respondWith( | |
| caches.match(event.request) | |
| .then((response) => response || fetch(event.request)) | |
| ); | |
| }); |