debugging PWA

This commit is contained in:
Tobi 2024-04-09 10:30:01 +02:00
parent fac2662460
commit 569ce42487
3 changed files with 26 additions and 42 deletions

View file

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