This commit is contained in:
2025-09-27 20:49:58 +02:00
commit 767fb638ce
58 changed files with 6724 additions and 0 deletions

19
static/js/sw.js Normal file
View File

@@ -0,0 +1,19 @@
const CACHE_NAME = "minifb-v1";
const urlsToCache = [
"/",
"/static/css/styles.css",
"/static/js/theme.js",
"/static/manifest.json"
];
self.addEventListener("install", event => {
event.waitUntil(
caches.open(CACHE_NAME).then(cache => cache.addAll(urlsToCache))
);
});
self.addEventListener("fetch", event => {
event.respondWith(
caches.match(event.request).then(response => response || fetch(event.request))
);
});