From f04b425217cfa33cd2440336f00e9fee868be78c Mon Sep 17 00:00:00 2001 From: Frank Schwenk Date: Thu, 15 May 2025 14:35:39 +0200 Subject: [PATCH] This is the last time we let Pasha commit ascii porn in the comments. --- icon-192.png | Bin 0 -> 364 bytes icon-512.png | Bin 0 -> 601 bytes index.html | 9 +++++++++ manifest.json | 22 ++++++++++++++++++++++ service-worker.js | 31 +++++++++++++++++++++++++++++++ 5 files changed, 62 insertions(+) create mode 100644 icon-192.png create mode 100644 icon-512.png create mode 100644 manifest.json create mode 100644 service-worker.js diff --git a/icon-192.png b/icon-192.png new file mode 100644 index 0000000000000000000000000000000000000000..db37380b1c693538f1b0c84dfe31a43c4663eef0 GIT binary patch literal 364 zcmeAS@N?(olHy`uVBq!ia0vp^2SAvK8A$4HYMBD06p}rHd>I(3)EF2VS{N990fib~ zFff!FFfhDIU|_JC!N4G1FlSew4N!t7z$e5NNc*f0kXQWl|NsAb_Nmu^e8wbicNb8Oo>NRci-AIxo-U3d8Ta0vUdYJ6z`?x0_T}Wb%y=^=bwdgQ6ifKP5A*61RrKL53568Z_WGlw{_n7MCRE7U0%1#a+N3sE5JR L)z4*}Q$iB}_F!JR literal 0 HcmV?d00001 diff --git a/icon-512.png b/icon-512.png new file mode 100644 index 0000000000000000000000000000000000000000..317ffadeba195a7c11bec462aa8ff7c75c9cbbfd GIT binary patch literal 601 zcmeAS@N?(olHy`uVBq!ia0y~yU;;9k7?_xWRHv9tCXiA{_6YK2V5m}KU}$JzVE6?T zYIwoGP-?)y@G60U!D@QjQd6a|oDh=Z6)(xOYNgt+%_ zh~;^*>QU9Bd;O>X1GSE1;NHN>#n$&Wrrq}|Fc?%zTq8l#m4Sg+{k0?%4Y~O#nQ4`{HKZ%$-2-aSfZI@#nVVW%l9*e7 VTaSUcKO-n|JYD@<);T3K0RZvdUJ(EQ literal 0 HcmV?d00001 diff --git a/index.html b/index.html index 39572d2..514f75e 100644 --- a/index.html +++ b/index.html @@ -11,6 +11,8 @@ + + Pool Scoring @@ -1733,5 +1735,12 @@ closeGameCompletionModal(); } + \ No newline at end of file diff --git a/manifest.json b/manifest.json new file mode 100644 index 0000000..e489f73 --- /dev/null +++ b/manifest.json @@ -0,0 +1,22 @@ +{ + "name": "BSC Score", + "short_name": "BSC", + "description": "Pool Scoring App für den Billard Sport Club", + "lang": "de", + "start_url": ".", + "display": "standalone", + "background_color": "#1a1a1a", + "theme_color": "#000000", + "icons": [ + { + "src": "icon-192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "icon-512.png", + "sizes": "512x512", + "type": "image/png" + } + ] +} \ No newline at end of file diff --git a/service-worker.js b/service-worker.js new file mode 100644 index 0000000..844183c --- /dev/null +++ b/service-worker.js @@ -0,0 +1,31 @@ +const CACHE_NAME = 'bscscore-v1'; +const URLS_TO_CACHE = [ + '/', + '/index.html', + '/manifest.json', + '/favicon.ico', + '/icon-192.png', + '/icon-512.png' +]; + +self.addEventListener('install', event => { + event.waitUntil( + caches.open(CACHE_NAME).then(cache => cache.addAll(URLS_TO_CACHE)) + ); +}); + +self.addEventListener('activate', event => { + event.waitUntil( + caches.keys().then(keys => + Promise.all(keys.filter(key => key !== CACHE_NAME).map(key => caches.delete(key))) + ) + ); +}); + +self.addEventListener('fetch', event => { + event.respondWith( + caches.match(event.request).then(response => + response || fetch(event.request).catch(() => caches.match('/index.html')) + ) + ); +}); \ No newline at end of file