Added Android OS detection from useragent
git-svn-id: https://beef.googlecode.com/svn/trunk@1254 b87d56ec-f9c0-11de-8c8a-61c5e9addfc9
This commit is contained in:
@@ -85,6 +85,10 @@ beef.os = {
|
||||
return (this.ua.match('(Maemo Browser)|(Symbian)|(Nokia)')) ? true : false;
|
||||
},
|
||||
|
||||
isAndroid: function() {
|
||||
return (this.ua.indexOf('Android')) ? true : false;
|
||||
},
|
||||
|
||||
isBlackBerry: function() {
|
||||
return (this.ua.indexOf('BlackBerry')) ? true : false;
|
||||
},
|
||||
@@ -124,6 +128,9 @@ beef.os = {
|
||||
// BlackBerry
|
||||
if(this.isBlackBerry()) return 'BlackBerry OS';
|
||||
|
||||
// Android
|
||||
if(this.isAndroid()) return 'Android';
|
||||
|
||||
//linux
|
||||
if(this.isLinux()) return 'Linux';
|
||||
if(this.isSunOS()) return 'Sun OS';
|
||||
|
||||
Reference in New Issue
Block a user