Skip to content
Snippets Groups Projects

Add a service worker, manifest and logo

Merged Nayeem Rahman requested to merge (removed):service-worker into master
4 files
+ 95
0
Compare changes
  • Side-by-side
  • Inline
Files
4
+ 16
0
@@ -2,6 +2,22 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="manifest" href="manifest.json">
<link rel="shortcut icon" href="logo.png">
<script>
if (navigator.serviceWorker) {
navigator.serviceWorker
.register("service-worker.js")
.then(
(registration) =>
console.log(
`Service worker registered on scope ${registration.scope}`,
),
(reason) =>
console.log(`Service worker failed to register ~ ${reason}`),
)
}
</script>
</head>
<body>
<div>
Loading