debugging PWA
This commit is contained in:
parent
2a8c0cece0
commit
b0a564e602
1 changed files with 3 additions and 3 deletions
|
@ -163,12 +163,12 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
// Show installation instructions only if accessed via browser
|
// 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';
|
document.getElementById('install-instructions').style.display = 'block';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Detect when the app is launched from the home screen and hide installation instructions
|
// Hide installation instructions once installed as standalone PWA
|
||||||
window.addEventListener('appinstalled', (event) => {
|
window.addEventListener('beforeinstallprompt', (event) => {
|
||||||
document.getElementById('install-instructions').style.display = 'none';
|
document.getElementById('install-instructions').style.display = 'none';
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in a new issue