mirror of
https://github.com/lancedikson/bowser
synced 2024-10-27 20:34:22 +00:00
added tablet detection, refined blackberry and older mobile chrome detection, added more tests for android native browser
This commit is contained in:
parent
a4be4df6b0
commit
bae0904d80
38
bowser.js
38
bowser.js
@ -24,7 +24,7 @@
|
||||
function detect(ua) {
|
||||
|
||||
var ie = /(msie|trident)/i.test(ua)
|
||||
, chrome = /chrome|crios/i.test(ua)
|
||||
, chrome = /chrome|crios|crmo/i.test(ua)
|
||||
, phantom = /phantom/i.test(ua)
|
||||
, iphone = /iphone/i.test(ua)
|
||||
, ipad = /ipad/i.test(ua)
|
||||
@ -37,10 +37,14 @@
|
||||
, gecko = /gecko\//i.test(ua)
|
||||
, seamonkey = /seamonkey\//i.test(ua)
|
||||
, webos = /(?:web|hpw)os/i.test(ua)
|
||||
, touchpad = /touchpad\//i.test(ua)
|
||||
, windowsphone = /windows phone/i.test(ua)
|
||||
, blackberry = /blackberry/i.test(ua)
|
||||
, blackberry = /(blackberry|\bbb\d+)/i.test(ua)
|
||||
, rimtablet = /rim\stablet/i.test(ua)
|
||||
, webkitVersion = /version\/(\d+(\.\d+)?)/i
|
||||
, firefoxVersion = /firefox[ \/](\d+(\.\d+)?)/i
|
||||
, mobile = /mobi/i.test(ua)
|
||||
, tablet = /tablet/i.test(ua)
|
||||
, o = {}
|
||||
|
||||
if (ipod) iphone = false
|
||||
@ -49,7 +53,6 @@
|
||||
name: 'Windows Phone'
|
||||
, windowsphone: t
|
||||
, msie: t
|
||||
, mobile: t
|
||||
, version: getVersion(ua, /iemobile\/(\d+(\.\d+)?)/i, 1)
|
||||
}
|
||||
else if (opera) {
|
||||
@ -63,7 +66,6 @@
|
||||
}
|
||||
if (android) {
|
||||
o.android = t
|
||||
o.mobile = t
|
||||
}
|
||||
if (chrome) {
|
||||
o.webkit = t
|
||||
@ -79,14 +81,13 @@
|
||||
name: 'Chrome'
|
||||
, webkit: t
|
||||
, chrome: t
|
||||
, version: getVersion(ua, /(?:chrome|crios)\/(\d+(\.\d+)?)/i, 1)
|
||||
, version: getVersion(ua, /(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i, 1)
|
||||
}
|
||||
if (android) o.android = t
|
||||
if (ipad || ipod || iphone) {
|
||||
o[iphone ? 'iphone' : ipad ? 'ipad' : 'ipod'] = t
|
||||
o.ios = t
|
||||
}
|
||||
if (o.android || o.ios) o.mobile = t
|
||||
}
|
||||
else if (phantom) o = {
|
||||
name: 'PhantomJS'
|
||||
@ -99,14 +100,12 @@
|
||||
, silk: t
|
||||
, webkit: t
|
||||
, android: t
|
||||
, mobile: t
|
||||
, version : getVersion(ua, /silk\/(\d+(\.\d+)?)/i, 1)
|
||||
}
|
||||
else if (iphone || ipad || ipod) {
|
||||
o = {
|
||||
name : iphone ? 'iPhone' : ipad ? 'iPad' : 'iPod'
|
||||
, webkit: t
|
||||
, mobile: t
|
||||
, ios: t
|
||||
}
|
||||
o[iphone ? 'iphone' : ipad ? 'ipad' : 'ipod'] = t
|
||||
@ -115,11 +114,10 @@
|
||||
o.version = getVersion(ua, webkitVersion, 1)
|
||||
}
|
||||
}
|
||||
else if (blackberry) {
|
||||
else if (blackberry || rimtablet) {
|
||||
o = {
|
||||
name: 'BlackBerry'
|
||||
, blackberry: t
|
||||
, mobile: t
|
||||
}
|
||||
if ((v = getVersion(ua, webkitVersion, 1))) {
|
||||
o.version = v
|
||||
@ -131,12 +129,11 @@
|
||||
else if (webos) {
|
||||
o = {
|
||||
name: 'WebOS'
|
||||
, mobile: t
|
||||
, webkit: t
|
||||
, webos: t
|
||||
, version: (getVersion(ua, webkitVersion, 1) || getVersion(ua, /w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i, 1))
|
||||
};
|
||||
/touchpad\//i.test(ua) && (o.touchpad = t)
|
||||
touchpad && (o.touchpad = t)
|
||||
}
|
||||
else if (gecko) {
|
||||
o = {
|
||||
@ -155,17 +152,14 @@
|
||||
}
|
||||
if (android) {
|
||||
o.android = t
|
||||
o.mobile = t
|
||||
} else if (!android && firefox && /\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(ua)) {
|
||||
o.firefoxos = t
|
||||
o.mobile = t
|
||||
}
|
||||
}
|
||||
else if (android) o = {
|
||||
name: 'Android'
|
||||
, webkit: t
|
||||
, android: t
|
||||
, mobile: t
|
||||
, version: getVersion(ua, webkitVersion, 1)
|
||||
}
|
||||
else if (safari) o = {
|
||||
@ -175,9 +169,11 @@
|
||||
, version: getVersion(ua, webkitVersion, 1)
|
||||
}
|
||||
|
||||
|
||||
// OS version extraction
|
||||
var osVersion;
|
||||
if (android) {
|
||||
osVersion = getVersion(ua, /android[ \/](\d+(\.\d+)*)/i, 1);
|
||||
osVersion = getVersion(ua, /android[ \/-](\d+(\.\d+)*)/i, 1);
|
||||
if (osVersion) {
|
||||
o.osversion = osVersion;
|
||||
}
|
||||
@ -188,11 +184,21 @@
|
||||
osVersion = getVersion(ua, /windows phone (?:os)?\s?(\d+(\.\d+)*)/i, 1);
|
||||
} else if (webos) {
|
||||
osVersion = getVersion(ua, /(?:web|hpw)os\/(\d+(\.\d+)*)/i, 1);
|
||||
} else if (rimtablet) {
|
||||
osVersion = getVersion(ua, /rim\stablet\sos\s(\d+(\.\d+)*)/i, 1);
|
||||
}
|
||||
if (osVersion) {
|
||||
o.osversion = osVersion;
|
||||
}
|
||||
|
||||
// device type extraction
|
||||
var osMajorVersion = (osVersion || "").split('.')[0];
|
||||
if (tablet || ipad || rimtablet || silk || touchpad || (android && (osMajorVersion == 3 || (osMajorVersion == 4 && !mobile)))) {
|
||||
o.tablet = t
|
||||
} else if (iphone || ipod || (android && mobile) || windowsphone || blackberry || webos || mobile) {
|
||||
o.mobile = t
|
||||
}
|
||||
|
||||
// Graded Browser Support
|
||||
// http://developer.yahoo.com/yui/articles/gbs
|
||||
if ((o.msie && o.version >= 9) ||
|
||||
|
2
bowser.min.js
vendored
2
bowser.min.js
vendored
@ -3,4 +3,4 @@
|
||||
* https://github.com/ded/bowser
|
||||
* MIT License | (c) Dustin Diaz 2014
|
||||
*/
|
||||
!function(e,t){typeof module!="undefined"&&module.exports?module.exports.browser=t():typeof define=="function"?define(t):this[e]=t()}("bowser",function(){function n(e,t,n){var r=e.match(t);return r&&r.length>n&&r[n]||0}function r(r){var i=/(msie|trident)/i.test(r),s=/chrome|crios/i.test(r),o=/phantom/i.test(r),u=/iphone/i.test(r),a=/ipad/i.test(r),f=/ipod/i.test(r),l=/silk/i.test(r),c=/safari/i.test(r)&&!s&&!o&&!l,h=/android/i.test(r),p=/opera/i.test(r)||/opr/i.test(r),d=/firefox/i.test(r),m=/gecko\//i.test(r),g=/seamonkey\//i.test(r),y=/(?:web|hpw)os/i.test(r),b=/windows phone/i.test(r),w=/blackberry/i.test(r),E=/version\/(\d+(\.\d+)?)/i,S=/firefox[ \/](\d+(\.\d+)?)/i,x={};f&&(u=!1);if(b)x={name:"Windows Phone",windowsphone:e,msie:e,mobile:e,version:n(r,/iemobile\/(\d+(\.\d+)?)/i,1)};else if(p)t=n(r,E,1)||n(r,/opr\/(\d+(\.\d+)?)/i,1)||n(r,/opera[ \/](\d+(\.\d+)?)/i,1),x={name:"Opera",opera:e,version:t},h&&(x.android=e,x.mobile=e),s&&(x.webkit=e);else if(i)x={name:"Internet Explorer",msie:e,version:n(r,/(msie |rv:)(\d+(\.\d+)?)/i,2)};else if(s){x={name:"Chrome",webkit:e,chrome:e,version:n(r,/(?:chrome|crios)\/(\d+(\.\d+)?)/i,1)},h&&(x.android=e);if(a||f||u)x[u?"iphone":a?"ipad":"ipod"]=e,x.ios=e;if(x.android||x.ios)x.mobile=e}else o?x={name:"PhantomJS",webkit:e,phantom:e,version:n(r,/phantomjs\/(\d+(\.\d+)?)/i,1)}:l?x={name:"Amazon Silk",silk:e,webkit:e,android:e,mobile:e,version:n(r,/silk\/(\d+(\.\d+)?)/i,1)}:u||a||f?(x={name:u?"iPhone":a?"iPad":"iPod",webkit:e,mobile:e,ios:e},x[u?"iphone":a?"ipad":"ipod"]=e,E.test(r)&&(x.version=n(r,E,1))):w?(x={name:"BlackBerry",blackberry:e,mobile:e},(t=n(r,E,1))?(x.version=t,x.webkit=e):x.version=n(r,/blackberry[\d]+\/(\d+(\.\d+)?)/i,1)):y?(x={name:"WebOS",mobile:e,webkit:e,webos:e,version:n(r,E,1)||n(r,/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i,1)},/touchpad\//i.test(r)&&(x.touchpad=e)):m?(x={name:"Gecko",gecko:e,mozilla:e,version:n(r,S,1)},g?(x.name="SeaMonkey",x.seamonkey=e,x.version=n(r,/seamonkey\/(\d+(\.\d+)?)/i,1)):d&&(x.name="Firefox",x.firefox=e),h?(x.android=e,x.mobile=e):!h&&d&&/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(r)&&(x.firefoxos=e,x.mobile=e)):h?x={name:"Android",webkit:e,android:e,mobile:e,version:n(r,E,1)}:c&&(x={name:"Safari",webkit:e,safari:e,version:n(r,E,1)});var T;return h?(T=n(r,/android[ \/](\d+(\.\d+)*)/i,1),T&&(x.osversion=T)):u||a||f?(T=n(r,/os (\d+([_\s]\d+)*) like mac os x/i,1),T=(T||"").replace(/[_\s]/g,".")):b?T=n(r,/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,1):y&&(T=n(r,/(?:web|hpw)os\/(\d+(\.\d+)*)/i,1)),T&&(x.osversion=T),x.msie&&x.version>=9||x.chrome&&x.version>=20||x.firefox&&x.version>=10||x.safari&&x.version>=5||x.opera&&x.version>=10||x.ios&&x.osversion&&x.osversion.split(".")[0]>=6?x.a=e:x.msie&&x.version<9||x.chrome&&x.version<20||x.firefox&&x.version<10||x.safari&&x.version<5||x.opera&&x.version<10||x.ios&&x.osversion&&x.osversion.split(".")[0]<6?x.c=e:x.x=e,x}var e=!0,t,i=r(typeof navigator!="undefined"?navigator.userAgent:"");return i._detect=r,i})
|
||||
!function(e,t){typeof module!="undefined"&&module.exports?module.exports.browser=t():typeof define=="function"?define(t):this[e]=t()}("bowser",function(){function n(e,t,n){var r=e.match(t);return r&&r.length>n&&r[n]||0}function r(r){var i=/(msie|trident)/i.test(r),s=/chrome|crios|crmo/i.test(r),o=/phantom/i.test(r),u=/iphone/i.test(r),a=/ipad/i.test(r),f=/ipod/i.test(r),l=/silk/i.test(r),c=/safari/i.test(r)&&!s&&!o&&!l,h=/android/i.test(r),p=/opera/i.test(r)||/opr/i.test(r),d=/firefox/i.test(r),m=/gecko\//i.test(r),g=/seamonkey\//i.test(r),y=/(?:web|hpw)os/i.test(r),b=/touchpad\//i.test(r),w=/windows phone/i.test(r),E=/(blackberry|\bbb\d+)/i.test(r),S=/rim\stablet/i.test(r),x=/version\/(\d+(\.\d+)?)/i,T=/firefox[ \/](\d+(\.\d+)?)/i,N=/mobi/i.test(r),C=/tablet/i.test(r),k={};f&&(u=!1);if(w)k={name:"Windows Phone",windowsphone:e,msie:e,version:n(r,/iemobile\/(\d+(\.\d+)?)/i,1)};else if(p)t=n(r,x,1)||n(r,/opr\/(\d+(\.\d+)?)/i,1)||n(r,/opera[ \/](\d+(\.\d+)?)/i,1),k={name:"Opera",opera:e,version:t},h&&(k.android=e),s&&(k.webkit=e);else if(i)k={name:"Internet Explorer",msie:e,version:n(r,/(msie |rv:)(\d+(\.\d+)?)/i,2)};else if(s){k={name:"Chrome",webkit:e,chrome:e,version:n(r,/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i,1)},h&&(k.android=e);if(a||f||u)k[u?"iphone":a?"ipad":"ipod"]=e,k.ios=e}else o?k={name:"PhantomJS",webkit:e,phantom:e,version:n(r,/phantomjs\/(\d+(\.\d+)?)/i,1)}:l?k={name:"Amazon Silk",silk:e,webkit:e,android:e,version:n(r,/silk\/(\d+(\.\d+)?)/i,1)}:u||a||f?(k={name:u?"iPhone":a?"iPad":"iPod",webkit:e,ios:e},k[u?"iphone":a?"ipad":"ipod"]=e,x.test(r)&&(k.version=n(r,x,1))):E||S?(k={name:"BlackBerry",blackberry:e},(t=n(r,x,1))?(k.version=t,k.webkit=e):k.version=n(r,/blackberry[\d]+\/(\d+(\.\d+)?)/i,1)):y?(k={name:"WebOS",webkit:e,webos:e,version:n(r,x,1)||n(r,/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i,1)},b&&(k.touchpad=e)):m?(k={name:"Gecko",gecko:e,mozilla:e,version:n(r,T,1)},g?(k.name="SeaMonkey",k.seamonkey=e,k.version=n(r,/seamonkey\/(\d+(\.\d+)?)/i,1)):d&&(k.name="Firefox",k.firefox=e),h?k.android=e:!h&&d&&/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(r)&&(k.firefoxos=e)):h?k={name:"Android",webkit:e,android:e,version:n(r,x,1)}:c&&(k={name:"Safari",webkit:e,safari:e,version:n(r,x,1)});var L;h?(L=n(r,/android[ \/-](\d+(\.\d+)*)/i,1),L&&(k.osversion=L)):u||a||f?(L=n(r,/os (\d+([_\s]\d+)*) like mac os x/i,1),L=(L||"").replace(/[_\s]/g,".")):w?L=n(r,/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,1):y?L=n(r,/(?:web|hpw)os\/(\d+(\.\d+)*)/i,1):S&&(L=n(r,/rim\stablet\sos\s(\d+(\.\d+)*)/i,1)),L&&(k.osversion=L);var A=(L||"").split(".")[0];if(C||a||S||l||b||h&&(A==3||A==4&&!N))k.tablet=e;else if(u||f||h&&N||w||E||y||N)k.mobile=e;return k.msie&&k.version>=9||k.chrome&&k.version>=20||k.firefox&&k.version>=10||k.safari&&k.version>=5||k.opera&&k.version>=10||k.ios&&k.osversion&&k.osversion.split(".")[0]>=6?k.a=e:k.msie&&k.version<9||k.chrome&&k.version<20||k.firefox&&k.version<10||k.safari&&k.version<5||k.opera&&k.version<10||k.ios&&k.osversion&&k.osversion.split(".")[0]<6?k.c=e:k.x=e,k}var e=!0,t,i=r(typeof navigator!="undefined"?navigator.userAgent:"");return i._detect=r,i})
|
@ -18,7 +18,7 @@
|
||||
function detect(ua) {
|
||||
|
||||
var ie = /(msie|trident)/i.test(ua)
|
||||
, chrome = /chrome|crios/i.test(ua)
|
||||
, chrome = /chrome|crios|crmo/i.test(ua)
|
||||
, phantom = /phantom/i.test(ua)
|
||||
, iphone = /iphone/i.test(ua)
|
||||
, ipad = /ipad/i.test(ua)
|
||||
@ -31,10 +31,14 @@
|
||||
, gecko = /gecko\//i.test(ua)
|
||||
, seamonkey = /seamonkey\//i.test(ua)
|
||||
, webos = /(?:web|hpw)os/i.test(ua)
|
||||
, touchpad = /touchpad\//i.test(ua)
|
||||
, windowsphone = /windows phone/i.test(ua)
|
||||
, blackberry = /blackberry/i.test(ua)
|
||||
, blackberry = /(blackberry|\bbb\d+)/i.test(ua)
|
||||
, rimtablet = /rim\stablet/i.test(ua)
|
||||
, webkitVersion = /version\/(\d+(\.\d+)?)/i
|
||||
, firefoxVersion = /firefox[ \/](\d+(\.\d+)?)/i
|
||||
, mobile = /mobi/i.test(ua)
|
||||
, tablet = /tablet/i.test(ua)
|
||||
, o = {}
|
||||
|
||||
if (ipod) iphone = false
|
||||
@ -43,7 +47,6 @@
|
||||
name: 'Windows Phone'
|
||||
, windowsphone: t
|
||||
, msie: t
|
||||
, mobile: t
|
||||
, version: getVersion(ua, /iemobile\/(\d+(\.\d+)?)/i, 1)
|
||||
}
|
||||
else if (opera) {
|
||||
@ -57,7 +60,6 @@
|
||||
}
|
||||
if (android) {
|
||||
o.android = t
|
||||
o.mobile = t
|
||||
}
|
||||
if (chrome) {
|
||||
o.webkit = t
|
||||
@ -73,14 +75,13 @@
|
||||
name: 'Chrome'
|
||||
, webkit: t
|
||||
, chrome: t
|
||||
, version: getVersion(ua, /(?:chrome|crios)\/(\d+(\.\d+)?)/i, 1)
|
||||
, version: getVersion(ua, /(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i, 1)
|
||||
}
|
||||
if (android) o.android = t
|
||||
if (ipad || ipod || iphone) {
|
||||
o[iphone ? 'iphone' : ipad ? 'ipad' : 'ipod'] = t
|
||||
o.ios = t
|
||||
}
|
||||
if (o.android || o.ios) o.mobile = t
|
||||
}
|
||||
else if (phantom) o = {
|
||||
name: 'PhantomJS'
|
||||
@ -93,14 +94,12 @@
|
||||
, silk: t
|
||||
, webkit: t
|
||||
, android: t
|
||||
, mobile: t
|
||||
, version : getVersion(ua, /silk\/(\d+(\.\d+)?)/i, 1)
|
||||
}
|
||||
else if (iphone || ipad || ipod) {
|
||||
o = {
|
||||
name : iphone ? 'iPhone' : ipad ? 'iPad' : 'iPod'
|
||||
, webkit: t
|
||||
, mobile: t
|
||||
, ios: t
|
||||
}
|
||||
o[iphone ? 'iphone' : ipad ? 'ipad' : 'ipod'] = t
|
||||
@ -109,11 +108,10 @@
|
||||
o.version = getVersion(ua, webkitVersion, 1)
|
||||
}
|
||||
}
|
||||
else if (blackberry) {
|
||||
else if (blackberry || rimtablet) {
|
||||
o = {
|
||||
name: 'BlackBerry'
|
||||
, blackberry: t
|
||||
, mobile: t
|
||||
}
|
||||
if ((v = getVersion(ua, webkitVersion, 1))) {
|
||||
o.version = v
|
||||
@ -125,12 +123,11 @@
|
||||
else if (webos) {
|
||||
o = {
|
||||
name: 'WebOS'
|
||||
, mobile: t
|
||||
, webkit: t
|
||||
, webos: t
|
||||
, version: (getVersion(ua, webkitVersion, 1) || getVersion(ua, /w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i, 1))
|
||||
};
|
||||
/touchpad\//i.test(ua) && (o.touchpad = t)
|
||||
touchpad && (o.touchpad = t)
|
||||
}
|
||||
else if (gecko) {
|
||||
o = {
|
||||
@ -149,17 +146,14 @@
|
||||
}
|
||||
if (android) {
|
||||
o.android = t
|
||||
o.mobile = t
|
||||
} else if (!android && firefox && /\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(ua)) {
|
||||
o.firefoxos = t
|
||||
o.mobile = t
|
||||
}
|
||||
}
|
||||
else if (android) o = {
|
||||
name: 'Android'
|
||||
, webkit: t
|
||||
, android: t
|
||||
, mobile: t
|
||||
, version: getVersion(ua, webkitVersion, 1)
|
||||
}
|
||||
else if (safari) o = {
|
||||
@ -169,9 +163,11 @@
|
||||
, version: getVersion(ua, webkitVersion, 1)
|
||||
}
|
||||
|
||||
|
||||
// OS version extraction
|
||||
var osVersion;
|
||||
if (android) {
|
||||
osVersion = getVersion(ua, /android[ \/](\d+(\.\d+)*)/i, 1);
|
||||
osVersion = getVersion(ua, /android[ \/-](\d+(\.\d+)*)/i, 1);
|
||||
if (osVersion) {
|
||||
o.osversion = osVersion;
|
||||
}
|
||||
@ -182,11 +178,21 @@
|
||||
osVersion = getVersion(ua, /windows phone (?:os)?\s?(\d+(\.\d+)*)/i, 1);
|
||||
} else if (webos) {
|
||||
osVersion = getVersion(ua, /(?:web|hpw)os\/(\d+(\.\d+)*)/i, 1);
|
||||
} else if (rimtablet) {
|
||||
osVersion = getVersion(ua, /rim\stablet\sos\s(\d+(\.\d+)*)/i, 1);
|
||||
}
|
||||
if (osVersion) {
|
||||
o.osversion = osVersion;
|
||||
}
|
||||
|
||||
// device type extraction
|
||||
var osMajorVersion = (osVersion || "").split('.')[0];
|
||||
if (tablet || ipad || rimtablet || silk || touchpad || (android && (osMajorVersion == 3 || (osMajorVersion == 4 && !mobile)))) {
|
||||
o.tablet = t
|
||||
} else if (iphone || ipod || (android && mobile) || windowsphone || blackberry || webos || mobile) {
|
||||
o.mobile = t
|
||||
}
|
||||
|
||||
// Graded Browser Support
|
||||
// http://developer.yahoo.com/yui/articles/gbs
|
||||
if ((o.msie && o.version >= 9) ||
|
||||
|
@ -7,7 +7,16 @@
|
||||
*/
|
||||
module.exports.useragents = {
|
||||
Chrome: {
|
||||
'Mozilla/5.0 (Linux; Android 4.3; Galaxy Nexus Build/JWR66Y) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.99 Mobile Safari/537.36': {
|
||||
'Mozilla/5.0 (Linux; Android 4.4.2; Nexus 7 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.99 Safari/537.36': {
|
||||
chrome: true
|
||||
, android: true
|
||||
, osversion: '4.4.2'
|
||||
, tablet: true
|
||||
, version: '32.0'
|
||||
, webkit: true
|
||||
, a: true
|
||||
}
|
||||
, 'Mozilla/5.0 (Linux; Android 4.3; Galaxy Nexus Build/JWR66Y) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.99 Mobile Safari/537.36': {
|
||||
chrome: true
|
||||
, android: true
|
||||
, osversion: '4.3'
|
||||
@ -25,6 +34,24 @@ module.exports.useragents = {
|
||||
, webkit: true
|
||||
, c: true
|
||||
}
|
||||
, 'Mozilla/5.0 (Linux; U; Android-4.0.3; en-us; Xoom Build/IML77) AppleWebKit/535.7 (KHTML, like Gecko) CrMo/16.0.912.75 Safari/535.7': {
|
||||
chrome: true
|
||||
, android: true
|
||||
, osversion: '4.0.3'
|
||||
, tablet: true
|
||||
, version: '16.0'
|
||||
, webkit: true
|
||||
, c: true
|
||||
}
|
||||
, 'Mozilla/5.0 (Linux; U; Android-4.0.3; en-us; Galaxy Nexus Build/IML74K) AppleWebKit/535.7 (KHTML, like Gecko) CrMo/16.0.912.75 Mobile Safari/535.7': {
|
||||
chrome: true
|
||||
, android: true
|
||||
, osversion: '4.0.3'
|
||||
, mobile: true
|
||||
, version: '16.0'
|
||||
, webkit: true
|
||||
, c: true
|
||||
}
|
||||
, 'Mozilla/5.0 (iPhone; U; CPU iPhone OS 5_1_1 like Mac OS X; en) AppleWebKit/534.46.0 (KHTML, like Gecko) CriOS/19.0.1084.60 Mobile/9B206 Safari/7534.48.3': {
|
||||
chrome: true
|
||||
, iphone: true
|
||||
@ -40,7 +67,7 @@ module.exports.useragents = {
|
||||
, ipad: true
|
||||
, ios: true
|
||||
, osversion: '5.1.1'
|
||||
, mobile: true
|
||||
, tablet: true
|
||||
, version: '19.0'
|
||||
, webkit: true
|
||||
, c: true
|
||||
@ -95,7 +122,7 @@ module.exports.useragents = {
|
||||
, webkit: true
|
||||
, android: true
|
||||
, osversion: '4.0.3'
|
||||
, mobile: true
|
||||
, tablet: true
|
||||
, version : '3.4'
|
||||
, x: true
|
||||
}
|
||||
@ -104,7 +131,7 @@ module.exports.useragents = {
|
||||
, silk: true
|
||||
, webkit: true
|
||||
, android: true
|
||||
, mobile: true
|
||||
, tablet: true
|
||||
, version : '3.4'
|
||||
, x: true
|
||||
}
|
||||
@ -114,7 +141,7 @@ module.exports.useragents = {
|
||||
, webkit: true
|
||||
, android: true
|
||||
, osversion: '2.3.4'
|
||||
, mobile: true
|
||||
, tablet: true
|
||||
, version : '1.0'
|
||||
, x: true
|
||||
}
|
||||
@ -123,13 +150,22 @@ module.exports.useragents = {
|
||||
, silk: true
|
||||
, webkit: true
|
||||
, android: true
|
||||
, mobile: true
|
||||
, tablet: true
|
||||
, version : '1.0'
|
||||
, x: true
|
||||
}
|
||||
}
|
||||
, Opera: {
|
||||
'Mozilla/5.0 (Linux; Android 4.3; Galaxy Nexus Build/JWR66Y) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.72 Mobile Safari/537.36 OPR/19.0.1340.69721': {
|
||||
'Mozilla/5.0 (Linux; Android 4.4.2; Nexus 7 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.72 Safari/537.36 OPR/19.0.1340.69721': {
|
||||
opera: true
|
||||
, webkit: true
|
||||
, android: true
|
||||
, osversion: '4.4.2'
|
||||
, tablet: true
|
||||
, version: '19.0'
|
||||
, a: true
|
||||
}
|
||||
, 'Mozilla/5.0 (Linux; Android 4.3; Galaxy Nexus Build/JWR66Y) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.72 Mobile Safari/537.36 OPR/19.0.1340.69721': {
|
||||
opera: true
|
||||
, webkit: true
|
||||
, android: true
|
||||
@ -152,6 +188,14 @@ module.exports.useragents = {
|
||||
, mobile: true
|
||||
, a: true
|
||||
}
|
||||
, 'Opera/9.80 (Android 4.4.2; Linux; Opera Tablet/ADR-1309251116) Presto/2.11.355 Version/12.10': {
|
||||
opera: true
|
||||
, version: '12.10'
|
||||
, android: true
|
||||
, osversion: '4.4.2'
|
||||
, tablet: true
|
||||
, a: true
|
||||
}
|
||||
, 'Opera/9.80 (Windows NT 6.0) Presto/2.12.388 Version/12.14': {
|
||||
opera: true
|
||||
, version: '12.14'
|
||||
@ -329,7 +373,7 @@ module.exports.useragents = {
|
||||
, gecko: true
|
||||
, firefox: true
|
||||
, version: '26.0'
|
||||
, mobile: true
|
||||
, tablet: true
|
||||
, firefoxos: true
|
||||
, a: true
|
||||
}
|
||||
@ -356,7 +400,7 @@ module.exports.useragents = {
|
||||
, gecko: true
|
||||
, firefox: true
|
||||
, version: '26.0'
|
||||
, mobile: true
|
||||
, tablet: true
|
||||
, android: true
|
||||
, a: true
|
||||
}
|
||||
@ -512,7 +556,7 @@ module.exports.useragents = {
|
||||
, name: 'iPad'
|
||||
, version: '7.0'
|
||||
, ipad: true
|
||||
, mobile: true
|
||||
, tablet: true
|
||||
, webkit: true
|
||||
, a: true
|
||||
}
|
||||
@ -522,7 +566,7 @@ module.exports.useragents = {
|
||||
, name: 'iPad'
|
||||
, version: '6.0'
|
||||
, ipad: true
|
||||
, mobile: true
|
||||
, tablet: true
|
||||
, webkit: true
|
||||
, a: true
|
||||
}
|
||||
@ -532,7 +576,7 @@ module.exports.useragents = {
|
||||
, name: 'iPad'
|
||||
, version: '5.1'
|
||||
, ipad: true
|
||||
, mobile: true
|
||||
, tablet: true
|
||||
, webkit: true
|
||||
, c: true
|
||||
}
|
||||
@ -542,7 +586,7 @@ module.exports.useragents = {
|
||||
, name: 'iPad'
|
||||
, version: '5.0'
|
||||
, ipad: true
|
||||
, mobile: true
|
||||
, tablet: true
|
||||
, webkit: true
|
||||
, c: true
|
||||
}
|
||||
@ -552,7 +596,7 @@ module.exports.useragents = {
|
||||
, name: 'iPad'
|
||||
, version: '4.0'
|
||||
, ipad: true
|
||||
, mobile: true
|
||||
, tablet: true
|
||||
, webkit: true
|
||||
, c: true
|
||||
}
|
||||
@ -595,7 +639,37 @@ module.exports.useragents = {
|
||||
}
|
||||
}
|
||||
, BlackBerry: {
|
||||
'Mozilla/5.0 (BlackBerry; U; BlackBerry 9900; en) AppleWebKit/534.11+ (KHTML, like Gecko) Version/7.1.0.346 Mobile Safari/534.11+': {
|
||||
'Mozilla/5.0 (BB10; Touch) AppleWebKit/537.10+ (KHTML, like Gecko) Version/10.1.0.4633 Mobile Safari/537.10+': {
|
||||
blackberry: true
|
||||
, version: '10.1'
|
||||
, webkit: true
|
||||
, mobile: true
|
||||
, x: true
|
||||
}
|
||||
, 'Mozilla/5.0 (BB10; Kbd) AppleWebKit/537.10+ (KHTML, like Gecko) Version/10.1.0.1429 Mobile Safari/537.10+': {
|
||||
blackberry: true
|
||||
, version: '10.1'
|
||||
, webkit: true
|
||||
, mobile: true
|
||||
, x: true
|
||||
}
|
||||
, 'Mozilla/5.0 (PlayBook; U; RIM Tablet OS 2.1.0; en-US) AppleWebKit/536.2+ (KHTML, like Gecko) Version/7.2.1.0 Safari/536.2+': {
|
||||
blackberry: true
|
||||
, osversion: '2.1.0'
|
||||
, version: '7.2'
|
||||
, webkit: true
|
||||
, tablet: true
|
||||
, x: true
|
||||
}
|
||||
, 'Mozilla/5.0 (PlayBook; U; RIM Tablet OS 1.0.0; en-US) AppleWebKit/534.11 (KHTML, like Gecko) Version/7.1.0.7 Safari/534.11': {
|
||||
blackberry: true
|
||||
, osversion: '1.0.0'
|
||||
, version: '7.1'
|
||||
, webkit: true
|
||||
, tablet: true
|
||||
, x: true
|
||||
}
|
||||
, 'Mozilla/5.0 (BlackBerry; U; BlackBerry 9900; en) AppleWebKit/534.11+ (KHTML, like Gecko) Version/7.1.0.346 Mobile Safari/534.11+': {
|
||||
blackberry: true
|
||||
, version: '7.1'
|
||||
, webkit: true
|
||||
@ -676,7 +750,7 @@ module.exports.useragents = {
|
||||
, osversion: '3.0.5'
|
||||
, version: '234.83'
|
||||
, webkit: true
|
||||
, mobile: true
|
||||
, tablet: true
|
||||
, x: true
|
||||
}
|
||||
, 'Mozilla/5.0 (hp-tablet; Linux; hpwOS/3.0.2; U; en-US) AppleWebKit/534.6 (KHTML, like Gecko) wOSBrowser/234.40.1 Safari/534.6 TouchPad/1.0': {
|
||||
@ -685,7 +759,7 @@ module.exports.useragents = {
|
||||
, osversion: '3.0.2'
|
||||
, version: '234.40'
|
||||
, webkit: true
|
||||
, mobile: true
|
||||
, tablet: true
|
||||
, x: true
|
||||
}
|
||||
, 'Mozilla/5.0 (hp-tablet; Linux; hpwOS/3.0.0; U; de-DE) AppleWebKit/534.6 (KHTML, like Gecko) wOSBrowser/233.70 Safari/534.6 TouchPad/1.0': {
|
||||
@ -694,7 +768,7 @@ module.exports.useragents = {
|
||||
, osversion: '3.0.0'
|
||||
, version: '233.70'
|
||||
, webkit: true
|
||||
, mobile: true
|
||||
, tablet: true
|
||||
, x: true
|
||||
}
|
||||
, 'Mozilla/5.0 (Linux; webOS/2.1.2; U; xx-xx) AppleWebKit/534.6 (KHTML, like Gecko) webOSBrowser/221.11 Safari/534.6 Pre/3.0': {
|
||||
@ -723,7 +797,39 @@ module.exports.useragents = {
|
||||
}
|
||||
}
|
||||
, Android: {
|
||||
'Mozilla/5.0 (Linux; U; Android 2.3.4; en-us; T-Mobile G2 Build/GRJ22) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1': {
|
||||
'Mozilla/5.0 (Linux; U; Android 4.4.2; de-de; Nexus 7 Build/KOT49H) AppleWebKit/537.16 (KHTML, like Gecko) Version/4.0 Mobile Safari/537.16': {
|
||||
android: true
|
||||
, osversion: '4.4.2'
|
||||
, webkit: true
|
||||
, version: 4.0
|
||||
, mobile: true
|
||||
, x: true
|
||||
}
|
||||
, 'Mozilla/5.0 (Linux; U; Android 4.3; de-de; Galaxy Nexus Build/JWR66Y) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30': {
|
||||
android: true
|
||||
, osversion: '4.3'
|
||||
, webkit: true
|
||||
, version: 4.0
|
||||
, mobile: true
|
||||
, x: true
|
||||
}
|
||||
, 'Mozilla/5.0 (Linux; U; Android 4.2; en-us; Nexus 10 Build/JVP15I) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Safari/534.30': {
|
||||
android: true
|
||||
, osversion: '4.2'
|
||||
, webkit: true
|
||||
, version: 4.0
|
||||
, tablet: true
|
||||
, x: true
|
||||
}
|
||||
, 'Mozilla/5.0 (Linux; U; Android 3.2; de-de; A100 Build/HTJ85B) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13': {
|
||||
android: true
|
||||
, osversion: '3.2'
|
||||
, webkit: true
|
||||
, version: 4.0
|
||||
, tablet: true
|
||||
, x: true
|
||||
}
|
||||
, 'Mozilla/5.0 (Linux; U; Android 2.3.4; en-us; T-Mobile G2 Build/GRJ22) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1': {
|
||||
android: true
|
||||
, osversion: '2.3.4'
|
||||
, webkit: true
|
||||
|
Loading…
Reference in New Issue
Block a user