From db7fc3769b40961f6fd0b64d092f9e9e82552018 Mon Sep 17 00:00:00 2001 From: V Date: Sat, 15 Apr 2023 02:27:11 +0200 Subject: Fix settings on Vencord Mobile (#905) --- src/utils/misc.tsx | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/utils') diff --git a/src/utils/misc.tsx b/src/utils/misc.tsx index b64dff9..b6a6423 100644 --- a/src/utils/misc.tsx +++ b/src/utils/misc.tsx @@ -204,3 +204,7 @@ export const checkIntersecting = (el: Element) => { export function identity(value: T): T { return value; } + +// https://developer.mozilla.org/en-US/docs/Web/HTTP/Browser_detection_using_the_user_agent#mobile_tablet_or_desktop +// "In summary, we recommend looking for the string Mobi anywhere in the User Agent to detect a mobile device." +export const isMobile = navigator.userAgent.includes("Mobi"); -- cgit