add android handling

This commit is contained in:
Hailey
2024-06-16 21:24:50 -07:00
parent a09d699249
commit af124cc8b8
5 changed files with 50 additions and 15 deletions
+1
View File
@@ -1,3 +1,4 @@
export const isSafari = false
export const isFirefox = false
export const isTouchDevice = true
export const isAndroidWeb = false
+2
View File
@@ -5,3 +5,5 @@ export const isSafari = /^((?!chrome|android).)*safari/i.test(
export const isFirefox = /firefox|fxios/i.test(navigator.userAgent)
export const isTouchDevice =
'ontouchstart' in window || navigator.maxTouchPoints > 1
export const isAndroidWeb =
/android/i.test(navigator.userAgent) && isTouchDevice