From b0a564e6023723a505091a4b40e2c75de8a0c3c4 Mon Sep 17 00:00:00 2001 From: Tobi Date: Tue, 9 Apr 2024 10:40:34 +0200 Subject: [PATCH] debugging PWA --- index.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index 9437d3a..d2dde64 100644 --- a/index.html +++ b/index.html @@ -163,12 +163,12 @@ } // Show installation instructions only if accessed via browser - if (!window.matchMedia('(display-mode: standalone)').matches) { + if (window.matchMedia('(display-mode: browser)').matches) { document.getElementById('install-instructions').style.display = 'block'; } - // Detect when the app is launched from the home screen and hide installation instructions - window.addEventListener('appinstalled', (event) => { + // Hide installation instructions once installed as standalone PWA + window.addEventListener('beforeinstallprompt', (event) => { document.getElementById('install-instructions').style.display = 'none'; });