Fix settings on Vencord Mobile (#905)

This commit is contained in:
V 2023-04-15 02:27:11 +02:00 committed by GitHub
parent 6c719f5ee9
commit db7fc3769b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 30 additions and 12 deletions

View file

@ -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");