improvements to the pwa

This commit is contained in:
daniel31x13
2024-01-14 10:09:09 -05:00
parent 834d25a99e
commit d4f59d7f32
18 changed files with 168 additions and 23 deletions
+16
View File
@@ -0,0 +1,16 @@
export function isPWA() {
return (
window.matchMedia("(display-mode: standalone)").matches ||
(window.navigator as any).standalone ||
document.referrer.includes("android-app://")
);
}
export function dropdownTriggerer(e: any) {
let targetEl = e.currentTarget;
if (targetEl && targetEl.matches(":focus")) {
setTimeout(function () {
targetEl.blur();
}, 0);
}
}