1
0
mirror of https://github.com/lancedikson/bowser synced 2024-10-27 20:34:22 +00:00

removed falsy flags from results, added osversion for ios/android/winphone,

added msie flag for winphone, made ios safari a-grade down to v6
This commit is contained in:
BendingBender 2014-02-21 13:56:57 +01:00
parent 0da898f906
commit ede3ff49cd
4 changed files with 129 additions and 120 deletions

View File

@ -42,7 +42,6 @@
, blackberry = /blackberry/i.test(ua) , blackberry = /blackberry/i.test(ua)
, webkitVersion = /version\/(\d+(\.\d+)?)/i , webkitVersion = /version\/(\d+(\.\d+)?)/i
, firefoxVersion = /firefox[ \/](\d+(\.\d+)?)/i , firefoxVersion = /firefox[ \/](\d+(\.\d+)?)/i
, mobile = /mobile/i.test(ua)
, o = {} , o = {}
if (ipod) iphone = false if (ipod) iphone = false
@ -50,6 +49,7 @@
if (windowsphone) o = { if (windowsphone) o = {
name: 'Windows Phone' name: 'Windows Phone'
, windowsphone: t , windowsphone: t
, msie: t
, mobile: t , mobile: t
, version: getVersion(ua, /iemobile\/(\d+(\.\d+)?)/i, 1) , version: getVersion(ua, /iemobile\/(\d+(\.\d+)?)/i, 1)
} }
@ -75,18 +75,20 @@
, msie: t , msie: t
, version: getVersion(ua, /(msie |rv:)(\d+(\.\d+)?)/i, 2) , version: getVersion(ua, /(msie |rv:)(\d+(\.\d+)?)/i, 2)
} }
else if (chrome) o = { else if (chrome) {
o = {
name: 'Chrome' name: 'Chrome'
, webkit: t , webkit: t
, chrome: t , chrome: t
, version: getVersion(ua, /(?:chrome|crios)\/(\d+(\.\d+)?)/i, 1) , version: getVersion(ua, /(?:chrome|crios)\/(\d+(\.\d+)?)/i, 1)
, ipad: ipad
, iphone: iphone
, ipod: ipod
, ios: iphone || ipad || ipod
, android: android
, mobile: mobile
} }
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 = { else if (phantom) o = {
name: 'PhantomJS' name: 'PhantomJS'
, webkit: t , webkit: t
@ -112,10 +114,8 @@
, webkit: t , webkit: t
, mobile: t , mobile: t
, ios: t , ios: t
, iphone: iphone
, ipad: ipad
, ipod: ipod
} }
o[iphone ? 'iphone' : ipad ? 'ipad' : 'ipod'] = t
// WTF: version is not part of user agent in web apps // WTF: version is not part of user agent in web apps
if (webkitVersion.test(ua)) { if (webkitVersion.test(ua)) {
o.version = getVersion(ua, webkitVersion, 1) o.version = getVersion(ua, webkitVersion, 1)
@ -178,13 +178,33 @@
, version: getVersion(ua, webkitVersion, 1) , version: getVersion(ua, webkitVersion, 1)
} }
var osVersion;
if (android) {
osVersion = getVersion(ua, /android[ \/](\d+(\.\d+)*)/i, 1);
if (osVersion) {
o.osversion = osVersion;
}
} else if (iphone || ipad || ipod) {
osVersion = getVersion(ua, /os (\d+([_\s]\d+)*) like mac os x/i, 1);
if (osVersion) {
o.osversion = osVersion.replace(/[_\s]/g, '.');
}
} else if (windowsphone) {
osVersion = getVersion(ua, /windows phone (?:os)?\s?(\d+(\.\d+)*)/i, 1);
if (osVersion) {
o.osversion = osVersion;
}
}
// Graded Browser Support // Graded Browser Support
// http://developer.yahoo.com/yui/articles/gbs // http://developer.yahoo.com/yui/articles/gbs
if ((o.msie && o.version >= 9) || if ((o.msie && o.version >= 9) ||
(o.chrome && o.version >= 20) || (o.chrome && o.version >= 20) ||
(o.firefox && o.version >= 10.0) || (o.firefox && o.version >= 10.0) ||
(o.safari && o.version >= 5) || (o.safari && o.version >= 5) ||
(o.opera && o.version >= 10.0)) { (o.opera && o.version >= 10.0) ||
(o.ios && o.osversion && o.osversion.split(".")[0] >= 6)
) {
o.a = t; o.a = t;
} }
@ -192,7 +212,9 @@
(o.chrome && o.version < 20) || (o.chrome && o.version < 20) ||
(o.firefox && o.version < 10.0) || (o.firefox && o.version < 10.0) ||
(o.safari && o.version < 5) || (o.safari && o.version < 5) ||
(o.opera && o.version < 10.0)) { (o.opera && o.version < 10.0) ||
(o.ios && o.osversion && o.osversion.split(".")[0] < 6)
) {
o.c = t o.c = t
} else o.x = t } else o.x = t

2
bowser.min.js vendored
View File

@ -3,4 +3,4 @@
* https://github.com/ded/bowser * https://github.com/ded/bowser
* MIT License | (c) Dustin Diaz 2013 * MIT License | (c) Dustin Diaz 2013
*/ */
!function(e,t){typeof define=="function"?define(t):typeof module!="undefined"&&module.exports?module.exports.browser=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=/touchpad/i.test(r),c=/silk/i.test(r),h=/safari/i.test(r)&&!s&&!o&&!c,p=/android/i.test(r),d=/opera/i.test(r)||/opr/i.test(r),m=/firefox/i.test(r),g=/gecko\//i.test(r),y=/seamonkey\//i.test(r),b=/webos/i.test(r),w=/windows phone/i.test(r),E=/blackberry/i.test(r),S=/version\/(\d+(\.\d+)?)/i,x=/firefox[ \/](\d+(\.\d+)?)/i,T=/mobile/i.test(r),N={};return f&&(u=!1),w?N={name:"Windows Phone",windowsphone:e,mobile:e,version:n(r,/iemobile\/(\d+(\.\d+)?)/i,1)}:d?(t=n(r,S,1)||n(r,/opr\/(\d+(\.\d+)?)/i,1)||n(r,/opera[ \/](\d+(\.\d+)?)/i,1),N={name:"Opera",opera:e,version:t},p&&(N.android=e,N.mobile=e),s&&(N.webkit=e)):i?N={name:"Internet Explorer",msie:e,version:n(r,/(msie |rv:)(\d+(\.\d+)?)/i,2)}:s?N={name:"Chrome",webkit:e,chrome:e,version:n(r,/(?:chrome|crios)\/(\d+(\.\d+)?)/i,1),ipad:a,iphone:u,ipod:f,ios:u||a||f,android:p,mobile:T}:o?N={name:"PhantomJS",webkit:e,phantom:e,version:n(r,/phantomjs\/(\d+(\.\d+)?)/i,1)}:l?N={name:"TouchPad",webkit:e,touchpad:e,version:n(r,/touchpad\/(\d+(\.\d+)?)/i,1)}:c?N={name:"Amazon Silk",webkit:e,android:e,mobile:e,version:n(r,/silk\/(\d+(\.\d+)?)/i,1)}:u||a||f?(N={name:u?"iPhone":a?"iPad":"iPod",webkit:e,mobile:e,ios:e,iphone:u,ipad:a,ipod:f},S.test(r)&&(N.version=n(r,S,1))):E?(N={name:"BlackBerry",blackberry:e,mobile:e},(t=n(r,S,1))?(N.version=t,N.webkit=e):N.version=n(r,/blackberry[\d]+\/(\d+(\.\d+)?)/i,1)):b?N={name:"WebOS",mobile:e,webkit:e,webos:e,version:n(r,S,1)||n(r,/wosbrowser\/(\d+(\.\d+)?)/i,1)}:g?(N={name:"Gecko",gecko:e,mozilla:e,version:n(r,x,1)},y?(N.name="SeaMonkey",N.seamonkey=e,N.version=n(r,/seamonkey\/(\d+(\.\d+)?)/i,1)):m&&(N.name="Firefox",N.firefox=e),p?(N.android=e,N.mobile=e):!p&&m&&/\((mobile|tablet);.*rv:[\d\.]+\)/i.test(r)&&(N.firefoxos=e,N.mobile=e)):p?N={name:"Android",webkit:e,android:e,mobile:e,version:n(r,S,1)}:h&&(N={name:"Safari",webkit:e,safari:e,version:n(r,S,1)}),N.msie&&N.version>=9||N.chrome&&N.version>=20||N.firefox&&N.version>=10||N.safari&&N.version>=5||N.opera&&N.version>=10?N.a=e:N.msie&&N.version<9||N.chrome&&N.version<20||N.firefox&&N.version<10||N.safari&&N.version<5||N.opera&&N.version<10?N.c=e:N.x=e,N}var e=!0,t,i=r(typeof navigator!="undefined"?navigator.userAgent:"");return i._detect=r,i}) !function(e,t){typeof define=="function"?define(t):typeof module!="undefined"&&module.exports?module.exports.browser=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=/touchpad/i.test(r),c=/silk/i.test(r),h=/safari/i.test(r)&&!s&&!o&&!c,p=/android/i.test(r),d=/opera/i.test(r)||/opr/i.test(r),m=/firefox/i.test(r),g=/gecko\//i.test(r),y=/seamonkey\//i.test(r),b=/webos/i.test(r),w=/windows phone/i.test(r),E=/blackberry/i.test(r),S=/version\/(\d+(\.\d+)?)/i,x=/firefox[ \/](\d+(\.\d+)?)/i,T={};f&&(u=!1);if(w)T={name:"Windows Phone",windowsphone:e,msie:e,mobile:e,version:n(r,/iemobile\/(\d+(\.\d+)?)/i,1)};else if(d)t=n(r,S,1)||n(r,/opr\/(\d+(\.\d+)?)/i,1)||n(r,/opera[ \/](\d+(\.\d+)?)/i,1),T={name:"Opera",opera:e,version:t},p&&(T.android=e,T.mobile=e),s&&(T.webkit=e);else if(i)T={name:"Internet Explorer",msie:e,version:n(r,/(msie |rv:)(\d+(\.\d+)?)/i,2)};else if(s){T={name:"Chrome",webkit:e,chrome:e,version:n(r,/(?:chrome|crios)\/(\d+(\.\d+)?)/i,1)},p&&(T.android=e);if(a||f||u)T[u?"iphone":a?"ipad":"ipod"]=e,T.ios=e;if(T.android||T.ios)T.mobile=e}else o?T={name:"PhantomJS",webkit:e,phantom:e,version:n(r,/phantomjs\/(\d+(\.\d+)?)/i,1)}:l?T={name:"TouchPad",webkit:e,touchpad:e,version:n(r,/touchpad\/(\d+(\.\d+)?)/i,1)}:c?T={name:"Amazon Silk",webkit:e,android:e,mobile:e,version:n(r,/silk\/(\d+(\.\d+)?)/i,1)}:u||a||f?(T={name:u?"iPhone":a?"iPad":"iPod",webkit:e,mobile:e,ios:e},T[u?"iphone":a?"ipad":"ipod"]=e,S.test(r)&&(T.version=n(r,S,1))):E?(T={name:"BlackBerry",blackberry:e,mobile:e},(t=n(r,S,1))?(T.version=t,T.webkit=e):T.version=n(r,/blackberry[\d]+\/(\d+(\.\d+)?)/i,1)):b?T={name:"WebOS",mobile:e,webkit:e,webos:e,version:n(r,S,1)||n(r,/wosbrowser\/(\d+(\.\d+)?)/i,1)}:g?(T={name:"Gecko",gecko:e,mozilla:e,version:n(r,x,1)},y?(T.name="SeaMonkey",T.seamonkey=e,T.version=n(r,/seamonkey\/(\d+(\.\d+)?)/i,1)):m&&(T.name="Firefox",T.firefox=e),p?(T.android=e,T.mobile=e):!p&&m&&/\((mobile|tablet);.*rv:[\d\.]+\)/i.test(r)&&(T.firefoxos=e,T.mobile=e)):p?T={name:"Android",webkit:e,android:e,mobile:e,version:n(r,S,1)}:h&&(T={name:"Safari",webkit:e,safari:e,version:n(r,S,1)});var N;return p?(N=n(r,/android[ \/](\d+(\.\d+)*)/i,1),N&&(T.osversion=N)):u||a||f?(N=n(r,/os (\d+([_\s]\d+)*) like mac os x/i,1),N&&(T.osversion=N.replace(/[_\s]/g,"."))):w&&(N=n(r,/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,1),N&&(T.osversion=N)),T.msie&&T.version>=9||T.chrome&&T.version>=20||T.firefox&&T.version>=10||T.safari&&T.version>=5||T.opera&&T.version>=10||T.ios&&T.osversion&&T.osversion.split(".")[0]>=6?T.a=e:T.msie&&T.version<9||T.chrome&&T.version<20||T.firefox&&T.version<10||T.safari&&T.version<5||T.opera&&T.version<10||T.ios&&T.osversion&&T.osversion.split(".")[0]<6?T.c=e:T.x=e,T}var e=!0,t,i=r(typeof navigator!="undefined"?navigator.userAgent:"");return i._detect=r,i})

View File

@ -36,7 +36,6 @@
, blackberry = /blackberry/i.test(ua) , blackberry = /blackberry/i.test(ua)
, webkitVersion = /version\/(\d+(\.\d+)?)/i , webkitVersion = /version\/(\d+(\.\d+)?)/i
, firefoxVersion = /firefox[ \/](\d+(\.\d+)?)/i , firefoxVersion = /firefox[ \/](\d+(\.\d+)?)/i
, mobile = /mobile/i.test(ua)
, o = {} , o = {}
if (ipod) iphone = false if (ipod) iphone = false
@ -44,6 +43,7 @@
if (windowsphone) o = { if (windowsphone) o = {
name: 'Windows Phone' name: 'Windows Phone'
, windowsphone: t , windowsphone: t
, msie: t
, mobile: t , mobile: t
, version: getVersion(ua, /iemobile\/(\d+(\.\d+)?)/i, 1) , version: getVersion(ua, /iemobile\/(\d+(\.\d+)?)/i, 1)
} }
@ -69,18 +69,20 @@
, msie: t , msie: t
, version: getVersion(ua, /(msie |rv:)(\d+(\.\d+)?)/i, 2) , version: getVersion(ua, /(msie |rv:)(\d+(\.\d+)?)/i, 2)
} }
else if (chrome) o = { else if (chrome) {
o = {
name: 'Chrome' name: 'Chrome'
, webkit: t , webkit: t
, chrome: t , chrome: t
, version: getVersion(ua, /(?:chrome|crios)\/(\d+(\.\d+)?)/i, 1) , version: getVersion(ua, /(?:chrome|crios)\/(\d+(\.\d+)?)/i, 1)
, ipad: ipad
, iphone: iphone
, ipod: ipod
, ios: iphone || ipad || ipod
, android: android
, mobile: mobile
} }
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 = { else if (phantom) o = {
name: 'PhantomJS' name: 'PhantomJS'
, webkit: t , webkit: t
@ -106,10 +108,8 @@
, webkit: t , webkit: t
, mobile: t , mobile: t
, ios: t , ios: t
, iphone: iphone
, ipad: ipad
, ipod: ipod
} }
o[iphone ? 'iphone' : ipad ? 'ipad' : 'ipod'] = t
// WTF: version is not part of user agent in web apps // WTF: version is not part of user agent in web apps
if (webkitVersion.test(ua)) { if (webkitVersion.test(ua)) {
o.version = getVersion(ua, webkitVersion, 1) o.version = getVersion(ua, webkitVersion, 1)
@ -172,13 +172,33 @@
, version: getVersion(ua, webkitVersion, 1) , version: getVersion(ua, webkitVersion, 1)
} }
var osVersion;
if (android) {
osVersion = getVersion(ua, /android[ \/](\d+(\.\d+)*)/i, 1);
if (osVersion) {
o.osversion = osVersion;
}
} else if (iphone || ipad || ipod) {
osVersion = getVersion(ua, /os (\d+([_\s]\d+)*) like mac os x/i, 1);
if (osVersion) {
o.osversion = osVersion.replace(/[_\s]/g, '.');
}
} else if (windowsphone) {
osVersion = getVersion(ua, /windows phone (?:os)?\s?(\d+(\.\d+)*)/i, 1);
if (osVersion) {
o.osversion = osVersion;
}
}
// Graded Browser Support // Graded Browser Support
// http://developer.yahoo.com/yui/articles/gbs // http://developer.yahoo.com/yui/articles/gbs
if ((o.msie && o.version >= 9) || if ((o.msie && o.version >= 9) ||
(o.chrome && o.version >= 20) || (o.chrome && o.version >= 20) ||
(o.firefox && o.version >= 10.0) || (o.firefox && o.version >= 10.0) ||
(o.safari && o.version >= 5) || (o.safari && o.version >= 5) ||
(o.opera && o.version >= 10.0)) { (o.opera && o.version >= 10.0) ||
(o.ios && o.osversion && o.osversion.split(".")[0] >= 6)
) {
o.a = t; o.a = t;
} }
@ -186,7 +206,9 @@
(o.chrome && o.version < 20) || (o.chrome && o.version < 20) ||
(o.firefox && o.version < 10.0) || (o.firefox && o.version < 10.0) ||
(o.safari && o.version < 5) || (o.safari && o.version < 5) ||
(o.opera && o.version < 10.0)) { (o.opera && o.version < 10.0) ||
(o.ios && o.osversion && o.osversion.split(".")[0] < 6)
) {
o.c = t o.c = t
} else o.x = t } else o.x = t

View File

@ -9,11 +9,8 @@ module.exports.useragents = {
Chrome: { 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.3; Galaxy Nexus Build/JWR66Y) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.99 Mobile Safari/537.36': {
chrome: true chrome: true
, ipad: false
, iphone: false
, ipod: false
, ios: false
, android: true , android: true
, osversion: '4.3'
, mobile: true , mobile: true
, version: '32.0' , version: '32.0'
, webkit: true , webkit: true
@ -21,11 +18,8 @@ module.exports.useragents = {
} }
, 'Mozilla/5.0 (Linux; Android 4.1; Galaxy Nexus Build/JRN84D) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Mobile Safari/535.19': { , 'Mozilla/5.0 (Linux; Android 4.1; Galaxy Nexus Build/JRN84D) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Mobile Safari/535.19': {
chrome: true chrome: true
, ipad: false
, iphone: false
, ipod: false
, ios: false
, android: true , android: true
, osversion: '4.1'
, mobile: true , mobile: true
, version: '18.0' , version: '18.0'
, webkit: true , webkit: true
@ -33,11 +27,9 @@ module.exports.useragents = {
} }
, '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': { , '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 chrome: true
, ipad: false
, iphone: true , iphone: true
, ipod: false
, ios: true , ios: true
, android: false , osversion: '5.1.1'
, mobile: true , mobile: true
, version: '19.0' , version: '19.0'
, webkit: true , webkit: true
@ -46,10 +38,8 @@ module.exports.useragents = {
, 'Mozilla/5.0 (iPad; U; CPU OS 5_1_1 like Mac OS X; en-us) AppleWebKit/534.46.0 (KHTML, like Gecko) CriOS/19.0.1084.60 Mobile/9B206 Safari/7534.48.3': { , 'Mozilla/5.0 (iPad; U; CPU OS 5_1_1 like Mac OS X; en-us) AppleWebKit/534.46.0 (KHTML, like Gecko) CriOS/19.0.1084.60 Mobile/9B206 Safari/7534.48.3': {
chrome: true chrome: true
, ipad: true , ipad: true
, iphone: false
, ipod: false
, ios: true , ios: true
, android: false , osversion: '5.1.1'
, mobile: true , mobile: true
, version: '19.0' , version: '19.0'
, webkit: true , webkit: true
@ -57,84 +47,42 @@ module.exports.useragents = {
} }
, 'Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.17 Safari/537.36': { , 'Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.17 Safari/537.36': {
chrome: true chrome: true
, ipad: false
, iphone: false
, ipod: false
, ios: false
, android: false
, mobile: false
, version: '30.0' , version: '30.0'
, webkit: true , webkit: true
, a: true , a: true
} }
, 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.62 Safari/537.36': { , 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.62 Safari/537.36': {
chrome: true chrome: true
, ipad: false
, iphone: false
, ipod: false
, ios: false
, android: false
, mobile: false
, version: '29.0' , version: '29.0'
, webkit: true , webkit: true
, a: true , a: true
} }
, 'Mozilla/5.0 (X11; CrOS i686 4319.74.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.57 Safari/537.36': { , 'Mozilla/5.0 (X11; CrOS i686 4319.74.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.57 Safari/537.36': {
chrome: true chrome: true
, ipad: false
, iphone: false
, ipod: false
, ios: false
, android: false
, mobile: false
, version: '29.0' , version: '29.0'
, webkit: true , webkit: true
, a: true , a: true
} }
, 'Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.2 Safari/537.36': { , 'Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.2 Safari/537.36': {
chrome: true chrome: true
, ipad: false
, iphone: false
, ipod: false
, ios: false
, android: false
, mobile: false
, version: '29.0' , version: '29.0'
, webkit: true , webkit: true
, a: true , a: true
} }
, 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1468.0 Safari/537.36': { , 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1468.0 Safari/537.36': {
chrome: true chrome: true
, ipad: false
, iphone: false
, ipod: false
, ios: false
, android: false
, mobile: false
, version: '28.0' , version: '28.0'
, webkit: true , webkit: true
, a: true , a: true
} }
, 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_7) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.57 Safari/534.24': { , 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_7) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.57 Safari/534.24': {
chrome: true chrome: true
, ipad: false
, iphone: false
, ipod: false
, ios: false
, android: false
, mobile: false
, version: '11.0' , version: '11.0'
, webkit: true , webkit: true
, c: true , c: true
} }
, 'Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/534.3 (KHTML, like Gecko) Chrome/6.0.462.0 Safari/534.3': { , 'Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/534.3 (KHTML, like Gecko) Chrome/6.0.462.0 Safari/534.3': {
chrome: true chrome: true
, ipad: false
, iphone: false
, ipod: false
, ios: false
, android: false
, mobile: false
, version: '6.0' , version: '6.0'
, webkit: true , webkit: true
, c: true , c: true
@ -155,6 +103,7 @@ module.exports.useragents = {
opera: true opera: true
, webkit: true , webkit: true
, android: true , android: true
, osversion: '4.3'
, mobile: true , mobile: true
, version: '19.0' , version: '19.0'
, a: true , a: true
@ -169,6 +118,7 @@ module.exports.useragents = {
opera: true opera: true
, version: '12.10' , version: '12.10'
, android: true , android: true
, osversion: '4.3'
, mobile: true , mobile: true
, a: true , a: true
} }
@ -273,7 +223,12 @@ module.exports.useragents = {
} }
} }
, 'Internet Explorer': { , 'Internet Explorer': {
'Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; .NET4.0E; .NET4.0C; Media Center PC 6.0; rv:11.0) like Gecko': { 'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Trident/6.0; ARM; Touch; WPDesktop)': {
msie: true
, version: '10.0'
, a: true
}
, 'Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; .NET4.0E; .NET4.0C; Media Center PC 6.0; rv:11.0) like Gecko': {
msie: true msie: true
, version: '11.0' , version: '11.0'
, a: true , a: true
@ -467,42 +422,44 @@ module.exports.useragents = {
} }
} }
, iPhone: { , iPhone: {
'Mozilla/5.0 (iPhone Simulator; U; CPU iPhone OS 4_3_2 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8H7 Safari/6533.18.5': { 'Mozilla/5.0 (iPhone; CPU iPhone OS 7_0_4 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) Mobile/11B554a': {
ios: true ios: true
, version: '5.0' , osversion: '7.0.4'
, iphone: true , iphone: true
, ipad: false
, ipod: false
, mobile: true , mobile: true
, webkit: true , webkit: true
, x: true , a: true
}
, 'Mozilla/5.0 (iPhone Simulator; U; CPU iPhone OS 4_3_2 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8H7 Safari/6533.18.5': {
ios: true
, osversion: '4.3.2'
, version: '5.0'
, iphone: true
, mobile: true
, webkit: true
, c: true
} }
, 'Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1A543a Safari/419.3': { , 'Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1A543a Safari/419.3': {
ios: true ios: true
, version: '3.0' , version: '3.0'
, iphone: true , iphone: true
, ipad: false
, ipod: false
, mobile: true , mobile: true
, webkit: true , webkit: true
, x: true , x: true
} }
, 'Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_1 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8B5097d Safari/6531.22.7': { , 'Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_1 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8B5097d Safari/6531.22.7': {
ios: true ios: true
, osversion: '4.1'
, version: '4.0' , version: '4.0'
, iphone: true , iphone: true
, ipad: false
, ipod: false
, mobile: true , mobile: true
, webkit: true , webkit: true
, x: true , c: true
} }
, 'Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_5_2; en-gb) AppleWebKit/526+ (KHTML, like Gecko) Version/3.1 iPhone': { , 'Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_5_2; en-gb) AppleWebKit/526+ (KHTML, like Gecko) Version/3.1 iPhone': {
ios: true ios: true
, version: '3.1' , version: '3.1'
, iphone: true , iphone: true
, ipad: false
, ipod: false
, mobile: true , mobile: true
, webkit: true , webkit: true
, x: true , x: true
@ -511,75 +468,67 @@ module.exports.useragents = {
, iPad: { , iPad: {
'Mozilla/5.0 (iPad; CPU OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5355d Safari/8536.25': { 'Mozilla/5.0 (iPad; CPU OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5355d Safari/8536.25': {
ios: true ios: true
, osversion: '6.0'
, name: 'iPad' , name: 'iPad'
, version: '6.0' , version: '6.0'
, iphone: false
, ipad: true , ipad: true
, ipod: false
, mobile: true , mobile: true
, webkit: true , webkit: true
, x: true , a: true
} }
, 'Mozilla/5.0 (iPad; CPU OS 5_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko ) Version/5.1 Mobile/9B176 Safari/7534.48.3': { , 'Mozilla/5.0 (iPad; CPU OS 5_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko ) Version/5.1 Mobile/9B176 Safari/7534.48.3': {
ios: true ios: true
, osversion: '5.1'
, name: 'iPad' , name: 'iPad'
, version: '5.1' , version: '5.1'
, iphone: false
, ipad: true , ipad: true
, ipod: false
, mobile: true , mobile: true
, webkit: true , webkit: true
, x: true , c: true
} }
, 'Mozilla/5.0 (iPad; U; CPU OS 4_3_2 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8H7 Safari/6533.18.5': { , 'Mozilla/5.0 (iPad; U; CPU OS 4_3_2 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8H7 Safari/6533.18.5': {
ios: true ios: true
, osversion: '4.3.2'
, name: 'iPad' , name: 'iPad'
, version: '5.0' , version: '5.0'
, iphone: false
, ipad: true , ipad: true
, ipod: false
, mobile: true , mobile: true
, webkit: true , webkit: true
, x: true , c: true
} }
, 'Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; es-es) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B360 Safari/531.21.10': { , 'Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; es-es) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B360 Safari/531.21.10': {
ios: true ios: true
, osversion: '3.2'
, name: 'iPad' , name: 'iPad'
, version: '4.0' , version: '4.0'
, iphone: false
, ipad: true , ipad: true
, ipod: false
, mobile: true , mobile: true
, webkit: true , webkit: true
, x: true , c: true
} }
} }
, iPod: { , iPod: {
'Mozilla/5.0 (iPod; CPU iPhone OS 5_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9B176 Safari/7534.48.3': { 'Mozilla/5.0 (iPod; CPU iPhone OS 5_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9B176 Safari/7534.48.3': {
ios: true ios: true
, osversion: '5.1'
, version: '5.1' , version: '5.1'
, iphone: false
, ipad: false
, ipod: true , ipod: true
, mobile: true , mobile: true
, webkit: true , webkit: true
, x: true , c: true
} }
, 'Mozilla/5.0 (iPod; U; CPU iPhone OS 4_3_3 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8J2 Safari/6533.18.5': { , 'Mozilla/5.0 (iPod; U; CPU iPhone OS 4_3_3 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8J2 Safari/6533.18.5': {
ios: true ios: true
, osversion: '4.3.3'
, version: '5.0' , version: '5.0'
, iphone: false
, ipad: false
, ipod: true , ipod: true
, mobile: true , mobile: true
, webkit: true , webkit: true
, x: true , c: true
} }
, 'Mozilla/5.0 (iPod; U; CPU like Mac OS X; en) AppleWebKit/420.1 (KHTML, like Gecko) Version/3.0 Mobile/4A93 Safari/419.3': { , 'Mozilla/5.0 (iPod; U; CPU like Mac OS X; en) AppleWebKit/420.1 (KHTML, like Gecko) Version/3.0 Mobile/4A93 Safari/419.3': {
ios: true ios: true
, version: '3.0' , version: '3.0'
, iphone: false
, ipad: false
, ipod: true , ipod: true
, mobile: true , mobile: true
, webkit: true , webkit: true
@ -615,23 +564,37 @@ module.exports.useragents = {
} }
} }
, 'Windows Phone': { , 'Windows Phone': {
'Mozilla/5.0 (compatible; MSIE 10.0; Windows Phone 8.0; Trident/6.0; IEMobile/10.0; ARM; Touch; NOKIA; Lumia 920)': { 'Mozilla/5.0 (compatible; MSIE 10.0; Windows Phone 8.0; Trident/6.0; IEMobile/10.0; ARM; Touch; NOKIA; Lumia 920; Vodafone)': {
windowsphone: true windowsphone: true
, osversion: '8.0'
, msie: true
, version: '10.0' , version: '10.0'
, mobile: true , mobile: true
, x: true , a: true
}
, 'Mozilla/5.0 (compatible; MSIE 10.0; Windows Phone 8.0; Trident/6.0; IEMobile/10.0; ARM; Touch; NOKIA; Lumia 920)': {
windowsphone: true
, osversion: '8.0'
, msie: true
, version: '10.0'
, mobile: true
, a: true
} }
, 'Mozilla/5.0 (compatible; MSIE 9.0; Windows Phone OS 7.5; Trident/5.0; IEMobile/9.0)': { , 'Mozilla/5.0 (compatible; MSIE 9.0; Windows Phone OS 7.5; Trident/5.0; IEMobile/9.0)': {
windowsphone: true windowsphone: true
, osversion: '7.5'
, msie: true
, version: '9.0' , version: '9.0'
, mobile: true , mobile: true
, x: true , a: true
} }
, 'Mozilla/4.0 (compatible; MSIE 7.0; Windows Phone OS 7.0; Trident/3.1; IEMobile/7.0; Nokia;N70)': { , 'Mozilla/4.0 (compatible; MSIE 7.0; Windows Phone OS 7.0; Trident/3.1; IEMobile/7.0; Nokia;N70)': {
windowsphone: true windowsphone: true
, osversion: '7.0'
, msie: true
, version: '7.0' , version: '7.0'
, mobile: true , mobile: true
, x: true , c: true
} }
} }
, WebOS: { , WebOS: {
@ -646,6 +609,7 @@ module.exports.useragents = {
, Android: { , 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 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 android: true
, osversion: '2.3.4'
, webkit: true , webkit: true
, version: 4.0 , version: 4.0
, mobile: true , mobile: true
@ -653,6 +617,7 @@ module.exports.useragents = {
} }
, 'Mozilla/5.0 (Linux; U; Android 1.6; ar-us; SonyEricssonX10i Build/R2BA026) AppleWebKit/528.5+ (KHTML, like Gecko) Version/3.1.2 Mobile Safari/525.20.1': { , 'Mozilla/5.0 (Linux; U; Android 1.6; ar-us; SonyEricssonX10i Build/R2BA026) AppleWebKit/528.5+ (KHTML, like Gecko) Version/3.1.2 Mobile Safari/525.20.1': {
android: true android: true
, osversion: '1.6'
, webkit: true , webkit: true
, version: 3.1 , version: 3.1
, mobile: true , mobile: true