debugging PWA

This commit is contained in:
Tobi 2024-04-09 10:24:14 +02:00
parent 644dcbda29
commit 00041e6a88

View file

@ -95,16 +95,16 @@
</style> </style>
</head> </head>
<body> <body>
<h1>EUR-DZD</h1> <h1>Exchange Rate Calculator</h1>
<!-- Installation instructions (hidden by default) --> <!-- Installation instructions (initially hidden) -->
<div id="install-instructions"> <div id="install-instructions">
<p>For the best experience, add this web app to your home screen:</p> <p>For the best experience, add this web app to your home screen:</p>
<p>1. Tap the <strong>Share</strong> button.</p> <p>1. Tap the <strong>Share</strong> button.</p>
<p>2. Tap <strong>Add to Home Screen</strong>.</p> <p>2. Tap <strong>Add to Home Screen</strong>.</p>
</div> </div>
<!-- Installation button (hidden by default) --> <!-- Installation button (initially hidden) -->
<button id="installButton" onclick="installApp()">Install App</button> <button id="installButton" onclick="installApp()">Install App</button>
<form onsubmit="return convert(event)"> <form onsubmit="return convert(event)">
@ -189,11 +189,11 @@
// Hide the installation button once the app is installed // Hide the installation button once the app is installed
document.getElementById('installButton').style.display = 'none'; document.getElementById('installButton').style.display = 'none';
}
// Show installation instructions only if app is not already installed // Show installation instructions only if app is not already installed
if (!window.matchMedia('(display-mode: standalone)').matches) { if (!window.matchMedia('(display-mode: standalone)').matches) {
document.getElementById('install-instructions').style.display = 'block'; document.getElementById('install-instructions').style.display = 'block';
}
} }
</script> </script>
</body> </body>