Permalink
Browse files

Merge pull request #47 from Athou/master

meego mobile detection, and fix for fxos lookup
  • Loading branch information...
matthewhudson committed Dec 25, 2013
2 parents 30b9188 + 09d5b4a commit d3c587334c9edf14520cc60983c3d05beae8a7b1
Showing with 8 additions and 2 deletions.
  1. +8 −2 src/device.coffee
View
@@ -63,16 +63,19 @@ device.windowsTablet = ->
device.windows() and _find 'touch'
device.fxos = ->
- _find('(mobile; rv:') or _find('(tablet; rv:')
+ (_find('(mobile;') or _find('(tablet;')) and _find('; rv:')
device.fxosPhone = ->
device.fxos() and _find 'mobile'
device.fxosTablet = ->
device.fxos() and _find 'tablet'
+
+device.meego = ->
+ _find 'meego'
device.mobile = ->
- device.androidPhone() or device.iphone() or device.ipod() or device.windowsPhone() or device.blackberryPhone() or device.fxosPhone()
+ device.androidPhone() or device.iphone() or device.ipod() or device.windowsPhone() or device.blackberryPhone() or device.fxosPhone() or device.meego()
device.tablet = ->
device.ipad() or device.androidTablet() or device.blackberryTablet() or device.windowsTablet() or device.fxosTablet()
@@ -150,6 +153,9 @@ else if device.fxos()
else
_addClass "fxos mobile"
+else if device.meego()
+ _addClass "meego mobile"
+
else
_addClass "desktop"

0 comments on commit d3c5873

Please sign in to comment.