debugging PWA

This commit is contained in:
Tobi 2024-04-09 10:40:34 +02:00
parent 2a8c0cece0
commit b0a564e602

View file

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