aboutsummaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
authorV <vendicated@riseup.net>2023-04-15 02:27:11 +0200
committerGitHub <noreply@github.com>2023-04-15 02:27:11 +0200
commitdb7fc3769b40961f6fd0b64d092f9e9e82552018 (patch)
tree7ec8e4039a83c51e6098b38c0585bca101488f9a /src/utils
parent6c719f5ee921d48eea671b026e6aff2c0c49e914 (diff)
downloadVencord-db7fc3769b40961f6fd0b64d092f9e9e82552018.tar.gz
Vencord-db7fc3769b40961f6fd0b64d092f9e9e82552018.tar.bz2
Vencord-db7fc3769b40961f6fd0b64d092f9e9e82552018.zip
Fix settings on Vencord Mobile (#905)
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/misc.tsx4
1 files changed, 4 insertions, 0 deletions
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<T>(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");