diff options
Diffstat (limited to 'client/src/lib/components/browser.js')
| -rw-r--r-- | client/src/lib/components/browser.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/client/src/lib/components/browser.js b/client/src/lib/components/browser.js new file mode 100644 index 0000000..2ef33c5 --- /dev/null +++ b/client/src/lib/components/browser.js @@ -0,0 +1,15 @@ +const isIphone = (navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)) +const isIpad = (navigator.userAgent.match(/iPad/i)) +const isAndroid = (navigator.userAgent.match(/Android/i)) +const isMobile = isIphone || isIpad || isAndroid +const isDesktop = ! isMobile +const isFirefox = navigator.userAgent.match('Firefox') + +export default { + isIphone, + isIpad, + isAndroid, + isMobile, + isDesktop, + isFirefox, +}
\ No newline at end of file |
