diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2021-10-15 14:16:33 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2021-10-15 14:16:33 +0200 |
| commit | b2c6a37430438c72a0fee45bc2d538875f2f803e (patch) | |
| tree | 6830db03f1e7907c5537c74528190d6b3b7a4a5c /src/utils | |
| parent | 467c9335c16c701d0d7e04af39b858bbfe54db96 (diff) | |
update db
Diffstat (limited to 'src/utils')
| -rw-r--r-- | src/utils/index.js | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/utils/index.js b/src/utils/index.js index 7c4ca54..48c90af 100644 --- a/src/utils/index.js +++ b/src/utils/index.js @@ -21,10 +21,19 @@ export const capitalize = (text = "") => /* Mobile check */ +function isIpadOS() { + return ( + navigator.userAgent.match(/iPad/i) || + (navigator.maxTouchPoints && + navigator.maxTouchPoints > 2 && + /MacIntel/.test(navigator.platform)) + ); +} + export const isiPhone = !!( navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPod/i) ); -export const isiPad = !!navigator.userAgent.match(/iPad/i); +export const isiPad = isIpadOS(); export const isAndroid = !!navigator.userAgent.match(/Android/i); export const isMobile = isiPhone || isiPad || isAndroid; export const isDesktop = !isMobile; |
