iPhone: Tap ⬆️ (Share), then “Add to Home Screen.”
Android: Tap the 3-dot menu ⋮ and choose “Add to Home screen.”
Desktop: Click the install icon in the address bar or menu.
document.addEventListener('click', function(e) {
const modal = document.getElementById('install-modal');
if (e.target === modal) {
modal.style.display = 'none';
}
});
window.addEventListener('appinstalled', (evt) => {
console.log('✅ App was installed');
// You can also fire a POST to your DB if you wanna track installs
});