Initial Commit

This commit is contained in:
2025-06-12 20:14:59 +02:00
commit c7d0f5ceea
30 changed files with 6735 additions and 0 deletions

25
assets/sw.js Normal file
View File

@ -0,0 +1,25 @@
var cacheName = 'inkr';
var filesToCache = [
'./',
'./index.html',
'./inkr.js',
'./inkr.wasm',
];
/* Start the service worker and cache all of the app's content */
self.addEventListener('install', function(e) {
e.waitUntil(
caches.open(cacheName).then(function(cache) {
return cache.addAll(filesToCache);
})
);
});
/* Serve cached content when offline */
self.addEventListener('fetch', function(e) {
e.respondWith(
caches.match(e.request).then(function(response) {
return response || fetch(e.request);
})
);
});