debugging PWA
This commit is contained in:
parent
569ce42487
commit
5e2d392e8e
1 changed files with 4 additions and 4 deletions
|
@ -191,11 +191,11 @@
|
||||||
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 accessed via browser
|
||||||
window.addEventListener('beforeinstallprompt', (event) => {
|
if (!window.matchMedia('(display-mode: standalone)').matches) {
|
||||||
event.preventDefault();
|
|
||||||
document.getElementById('install-instructions').style.display = 'block';
|
document.getElementById('install-instructions').style.display = 'block';
|
||||||
});
|
document.getElementById('installButton').style.display = 'block';
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in a new issue