summaryrefslogtreecommitdiff
path: root/client/src/lib/components/browser.js
blob: 37af2aaa3a90c085958ad22429ea31ab2c23eded (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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,
}