debugging PWA
This commit is contained in:
parent
644dcbda29
commit
00041e6a88
1 changed files with 7 additions and 7 deletions
14
index.html
14
index.html
|
@ -95,16 +95,16 @@
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1>EUR-DZD</h1>
|
<h1>Exchange Rate Calculator</h1>
|
||||||
|
|
||||||
<!-- Installation instructions (hidden by default) -->
|
<!-- Installation instructions (initially hidden) -->
|
||||||
<div id="install-instructions">
|
<div id="install-instructions">
|
||||||
<p>For the best experience, add this web app to your home screen:</p>
|
<p>For the best experience, add this web app to your home screen:</p>
|
||||||
<p>1. Tap the <strong>Share</strong> button.</p>
|
<p>1. Tap the <strong>Share</strong> button.</p>
|
||||||
<p>2. Tap <strong>Add to Home Screen</strong>.</p>
|
<p>2. Tap <strong>Add to Home Screen</strong>.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Installation button (hidden by default) -->
|
<!-- Installation button (initially hidden) -->
|
||||||
<button id="installButton" onclick="installApp()">Install App</button>
|
<button id="installButton" onclick="installApp()">Install App</button>
|
||||||
|
|
||||||
<form onsubmit="return convert(event)">
|
<form onsubmit="return convert(event)">
|
||||||
|
@ -189,11 +189,11 @@
|
||||||
|
|
||||||
// Hide the installation button once the app is installed
|
// Hide the installation button once the app is installed
|
||||||
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 app is not already installed
|
||||||
if (!window.matchMedia('(display-mode: standalone)').matches) {
|
if (!window.matchMedia('(display-mode: standalone)').matches) {
|
||||||
document.getElementById('install-instructions').style.display = 'block';
|
document.getElementById('install-instructions').style.display = 'block';
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
Loading…
Reference in a new issue