Skip to content

Commit

Permalink
Adding support for meego, and fix for fixes detection.
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Hudson committed Dec 25, 2013
1 parent d3c5873 commit f1de998
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions lib/device.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
};

device.fxos = function() {
return _find('(mobile; rv:') || _find('(tablet; rv:');
return (_find('(mobile;') || _find('(tablet;')) && _find('; rv:');
};

device.fxosPhone = function() {
Expand All @@ -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() {
Expand Down Expand Up @@ -150,6 +154,8 @@
} else {
_addClass("fxos mobile");
}
} else if (device.meego()) {
_addClass("meego mobile");
} else {
_addClass("desktop");
}
Expand Down
2 changes: 1 addition & 1 deletion lib/device.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f1de998

Please sign in to comment.