diff --git a/index.html b/index.html
index 3d12570..453ab50 100644
--- a/index.html
+++ b/index.html
@@ -189,15 +189,13 @@
// Hide the installation button once the app is installed
document.getElementById('installButton').style.display = 'none';
-
- // Hide the installation instructions once the app is installed
- document.getElementById('install-instructions').style.display = 'none';
}
// Show installation instructions only if app is not already installed
- if (!window.matchMedia('(display-mode: standalone)').matches) {
+ window.addEventListener('beforeinstallprompt', (event) => {
+ event.preventDefault();
document.getElementById('install-instructions').style.display = 'block';
- }
+ });