diff options
| author | Adam Soltys <[email protected]> | 2022-11-09 23:05:09 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2022-11-09 23:05:09 -0800 |
| commit | 055aaea3d02995614b044f66c4a72d68385b1463 (patch) | |
| tree | 084da06fc774a9e875108cabc682dd5a7f764503 /src | |
| parent | 64284b65214f049f62c4ac7b123a64a164ecc5bf (diff) | |
| download | coinos-ui-055aaea3d02995614b044f66c4a72d68385b1463.tar.gz coinos-ui-055aaea3d02995614b044f66c4a72d68385b1463.zip | |
manifest and service worker
Diffstat (limited to 'src')
| -rw-r--r-- | src/app.html | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/app.html b/src/app.html index 42e791f7..b3325f4c 100644 --- a/src/app.html +++ b/src/app.html @@ -6,9 +6,24 @@ <meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="description" content="An easy bitcoin web wallet" /> <meta name="keywords" content="open source bitcoin lightning web wallet" /> + <link rel="manifest" href="manifest.webmanifest" /> %sveltekit.head% </head> <body> <div>%sveltekit.body%</div> </body> + <script> + if ('serviceWorker' in navigator) { + navigator.serviceWorker.register('/service-worker.js').then( + function (registration) { + console.log('Service worker registration succeeded:', registration); + }, + function (error) { + console.log('Service worker registration failed:', error); + } + ); + } else { + console.log('Service workers are not supported.'); + } + </script> </html> |
