diff --git a/client/index.html b/client/index.html index 4e72cc4..ad44482 100644 --- a/client/index.html +++ b/client/index.html @@ -44,7 +44,7 @@ - + diff --git a/client/manifest.json b/client/manifest.json index 0297c22..ae6f431 100644 --- a/client/manifest.json +++ b/client/manifest.json @@ -22,7 +22,7 @@ "sizes": "512x512", "type": "image/png" }], - "background_color": "#3367d6", + "background_color": "#efefef", "start_url": "/", "display": "minimal-ui", "theme_color": "#3367d6", diff --git a/client/scripts/ui.js b/client/scripts/ui.js index 7639ea1..4c48a7b 100644 --- a/client/scripts/ui.js +++ b/client/scripts/ui.js @@ -526,18 +526,13 @@ if ('serviceWorker' in navigator) { // don't display install banner when installed window.addEventListener('beforeinstallprompt', e => { if (window.matchMedia('(display-mode: standalone)').matches) { - return event.preventDefault(); + return e.preventDefault(); } else { const deferredPrompt = e; const btn = document.querySelector('#install') btn.hidden = false; - btn.onclick = _ => { - deferredPrompt.prompt(); - // Wait for the user to respond to the prompt - deferredPrompt.userChoice.then((resp) => { - console.log(JSON.stringify(resp)); - }); - } + btn.onclick = _ => deferredPrompt.prompt(); + return e.preventDefault(); } }); }