Permalink
Browse files

Adding support for meego, and fix for fixes detection.

  • Loading branch information...
1 parent d3c5873 commit f1de9986505bcdc25bd3b9938e3b88b88d06e780 @matthewhudson committed Dec 25, 2013
Showing with 9 additions and 3 deletions.
  1. +8 −2 lib/device.js
  2. +1 −1 lib/device.min.js
View
@@ -62,7 +62,7 @@
};
device.fxos = function() {
- return _find('(mobile; rv:') || _find('(tablet; rv:');
+ return (_find('(mobile;') || _find('(tablet;')) && _find('; rv:');
};
device.fxosPhone = function() {
@@ -73,8 +73,12 @@
return device.fxos() && _find('tablet');
};
+ device.meego = function() {
+ return _find('meego');
+ };
+
device.mobile = function() {
- return device.androidPhone() || device.iphone() || device.ipod() || device.windowsPhone() || device.blackberryPhone() || device.fxosPhone();
+ return device.androidPhone() || device.iphone() || device.ipod() || device.windowsPhone() || device.blackberryPhone() || device.fxosPhone() || device.meego();
};
device.tablet = function() {
@@ -150,6 +154,8 @@
} else {
_addClass("fxos mobile");
}
+ } else if (device.meego()) {
+ _addClass("meego mobile");
} else {
_addClass("desktop");
}
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

0 comments on commit f1de998

Please sign in to comment.