update global (texte + logo)
This commit is contained in:
20
Linkwarden/lib/client/utils.ts
Normal file
20
Linkwarden/lib/client/utils.ts
Normal file
@ -0,0 +1,20 @@
|
||||
export function isPWA() {
|
||||
return (
|
||||
window.matchMedia("(display-mode: standalone)").matches ||
|
||||
(window.navigator as any).standalone ||
|
||||
document.referrer.includes("android-app://")
|
||||
);
|
||||
}
|
||||
|
||||
export function isIphone() {
|
||||
return /iPhone/.test(navigator.userAgent) && !(window as any).MSStream;
|
||||
}
|
||||
|
||||
export function dropdownTriggerer(e: any) {
|
||||
let targetEl = e.currentTarget;
|
||||
if (targetEl && targetEl.matches(":focus")) {
|
||||
setTimeout(function () {
|
||||
targetEl.blur();
|
||||
}, 0);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user