changed logic in pwa install
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 10s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 10s
Gemini PR Review / Gemini PR Review (pull_request) Successful in 14s
Laravel Pint / pint (pull_request) Failing after 2m33s
Laravel Larastan / larastan (pull_request) Failing after 2m37s
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 10s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 10s
Gemini PR Review / Gemini PR Review (pull_request) Successful in 14s
Laravel Pint / pint (pull_request) Failing after 2m33s
Laravel Larastan / larastan (pull_request) Failing after 2m37s
This commit is contained in:
@@ -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 <b>Quality</b> App<br><small>Tap Share ⬆️ → Add to Home Screen</small>',
|
||||
buttonText: 'Got it',
|
||||
onClick: () => {
|
||||
localStorage.setItem("iosInstallShown", "1");
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
// document.addEventListener("DOMContentLoaded", () => {
|
||||
// if (
|
||||
// isIosSafari() &&
|
||||
// !isInStandaloneMode() &&
|
||||
// !localStorage.getItem("iosInstallShown")
|
||||
// ) {
|
||||
// showInstallBanner({
|
||||
// message: '📱 Install <b>Quality</b> App<br><small>Tap Share ⬆️ → Add to Home Screen</small>',
|
||||
// buttonText: 'Got it',
|
||||
// onClick: () => {
|
||||
// localStorage.setItem("iosInstallShown", "1");
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
|
||||
/* -----------------------------
|
||||
COMMON INSTALL BANNER UI
|
||||
|
||||
Reference in New Issue
Block a user