2024-01-14 09:09:09 -06:00
|
|
|
export function isPWA() {
|
|
|
|
return (
|
|
|
|
window.matchMedia("(display-mode: standalone)").matches ||
|
|
|
|
(window.navigator as any).standalone ||
|
|
|
|
document.referrer.includes("android-app://")
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2024-01-23 05:29:15 -06:00
|
|
|
export function isIphone() {
|
|
|
|
return /iPhone/.test(navigator.userAgent) && !(window as any).MSStream;
|
|
|
|
}
|
|
|
|
|
2024-01-14 09:09:09 -06:00
|
|
|
export function dropdownTriggerer(e: any) {
|
|
|
|
let targetEl = e.currentTarget;
|
|
|
|
if (targetEl && targetEl.matches(":focus")) {
|
|
|
|
setTimeout(function () {
|
|
|
|
targetEl.blur();
|
|
|
|
}, 0);
|
|
|
|
}
|
|
|
|
}
|