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
|
||||
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>
|
||||
|
|
Loading…
Reference in a new issue