Skip to content

Commit

Permalink
Merge pull request #65 from ShakeGuard/Katy-Add-PWA
Browse files Browse the repository at this point in the history
Remove service worker because of Chrome-only bug. :(
  • Loading branch information
nok-ko authored May 27, 2022
2 parents bfb212c + 487e74b commit 412822e
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions templates/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,9 @@
<script>
async function registerSW() {
if ('serviceWorker' in navigator) {
return;
try {
const registration = await navigator.serviceWorker.register('./sw.js', {scope: '/',});
if (registration.installing) {
console.log('Service worker installing');
} else if (registration.waiting) {
console.log('Service worker installed');
} else if (registration.active) {
console.log('Service worker active');
}
} catch (error) {
console.error(`Registration failed with ${error}`);
}
Expand Down

0 comments on commit 412822e

Please sign in to comment.