From fce45b538644a4219a84c5122e44145869dd7387 Mon Sep 17 00:00:00 2001 From: dhanabalan Date: Fri, 23 Jan 2026 15:39:48 +0530 Subject: [PATCH] changed logic in pwa install --- public/js/pwa-install.js | 56 ++++++++++++++++++++-------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/public/js/pwa-install.js b/public/js/pwa-install.js index 5d3b267..7227fdf 100644 --- a/public/js/pwa-install.js +++ b/public/js/pwa-install.js @@ -22,36 +22,36 @@ window.addEventListener("beforeinstallprompt", (e) => { }); }); -/* ----------------------------- - IOS SAFARI MANUAL INSTALL -------------------------------*/ -function isIosSafari() { - return ( - /iP(ad|hone|od)/.test(navigator.userAgent) && - /Safari/.test(navigator.userAgent) && - !/CriOS|FxiOS|OPiOS/.test(navigator.userAgent) - ); -} +// /* ----------------------------- +// IOS SAFARI MANUAL INSTALL +// ------------------------------*/ +// function isIosSafari() { +// return ( +// /iP(ad|hone|od)/.test(navigator.userAgent) && +// /Safari/.test(navigator.userAgent) && +// !/CriOS|FxiOS|OPiOS/.test(navigator.userAgent) +// ); +// } -function isInStandaloneMode() { - return window.navigator.standalone === true; -} +// function isInStandaloneMode() { +// return window.navigator.standalone == true; +// } -document.addEventListener("DOMContentLoaded", () => { - if ( - isIosSafari() && - !isInStandaloneMode() && - !localStorage.getItem("iosInstallShown") - ) { - showInstallBanner({ - message: '📱 Install Quality App
Tap Share ⬆️ → Add to Home Screen', - buttonText: 'Got it', - onClick: () => { - localStorage.setItem("iosInstallShown", "1"); - } - }); - } -}); +// document.addEventListener("DOMContentLoaded", () => { +// if ( +// isIosSafari() && +// !isInStandaloneMode() && +// !localStorage.getItem("iosInstallShown") +// ) { +// showInstallBanner({ +// message: '📱 Install Quality App
Tap Share ⬆️ → Add to Home Screen', +// buttonText: 'Got it', +// onClick: () => { +// localStorage.setItem("iosInstallShown", "1"); +// } +// }); +// } +// }); /* ----------------------------- COMMON INSTALL BANNER UI