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'; });