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

add blink flag when we can suppose it

fix #134
This commit is contained in:
Denis Demchenko 2016-05-09 09:05:59 +03:00
parent d6fb6d5358
commit 40fc55f393
2 changed files with 36 additions and 31 deletions

View File

@ -245,8 +245,13 @@
// set webkit or gecko flag for browsers based on these engines // set webkit or gecko flag for browsers based on these engines
if (!result.msedge && /(apple)?webkit/i.test(ua)) { if (!result.msedge && /(apple)?webkit/i.test(ua)) {
result.name = result.name || "Webkit" if (/(apple)?webkit\/537\.36/i.test(ua)) {
result.webkit = t result.name = result.name || "Blink"
result.blink = t
} else {
result.name = result.name || "Webkit"
result.webkit = t
}
if (!result.version && versionIdentifier) { if (!result.version && versionIdentifier) {
result.version = versionIdentifier result.version = versionIdentifier
} }

View File

@ -13,7 +13,7 @@ module.exports.useragents = {
, osversion: '5.1.1' , osversion: '5.1.1'
, tablet: true , tablet: true
, version: '47.0' , version: '47.0'
, webkit: true , blink: true
, a: true , a: true
} }
, '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': { , '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': {
@ -22,7 +22,7 @@ module.exports.useragents = {
, osversion: '4.4.2' , osversion: '4.4.2'
, tablet: true , tablet: true
, version: '32.0' , version: '32.0'
, webkit: true , blink: true
, a: 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': { , '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': {
@ -31,7 +31,7 @@ module.exports.useragents = {
, osversion: '4.3' , osversion: '4.3'
, mobile: true , mobile: true
, version: '32.0' , version: '32.0'
, webkit: true , blink: true
, a: true , a: true
} }
, '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': {
@ -85,14 +85,14 @@ module.exports.useragents = {
chrome: true chrome: true
, version: '30.0' , version: '30.0'
, windows: true , windows: true
, webkit: true , blink: 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
, version: '29.0' , version: '29.0'
, windows: true , windows: true
, webkit: true , blink: 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': {
@ -100,21 +100,21 @@ module.exports.useragents = {
, chromeBook: true , chromeBook: true
, version: '29.0' , version: '29.0'
, chromeos: true , chromeos: true
, webkit: true , blink: 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
, version: '29.0' , version: '29.0'
, windows: true , windows: true
, webkit: true , blink: 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
, version: '28.0' , version: '28.0'
, windows: true , windows: true
, webkit: true , blink: 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': {
@ -185,7 +185,7 @@ module.exports.useragents = {
, Opera: { , Opera: {
'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': { '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 opera: true
, webkit: true , blink: true
, android: true , android: true
, osversion: '4.4.2' , osversion: '4.4.2'
, tablet: true , tablet: true
@ -194,7 +194,7 @@ module.exports.useragents = {
} }
, '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.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 opera: true
, webkit: true , blink: true
, android: true , android: true
, osversion: '4.3' , osversion: '4.3'
, mobile: true , mobile: true
@ -204,7 +204,7 @@ module.exports.useragents = {
, 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.52 Safari/537.36 OPR/15.0.1147.100': { , 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.52 Safari/537.36 OPR/15.0.1147.100': {
opera: true opera: true
, windows: true , windows: true
, webkit: true , blink: true
, version: '15.0' , version: '15.0'
, a: true , a: true
} }
@ -304,22 +304,22 @@ module.exports.useragents = {
} }
} }
, 'Yandex Browser': { , 'Yandex Browser': {
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.118 YaBrowser/15.4.2272.3420 (beta) Yowser/2.0 Safari/537.36': { 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.118 YaBrowser/15.4.2272.3420 (beta) Yowser/2.0 Safari/537.36': {
yandexbrowser: true yandexbrowser: true
, webkit: true , blink: true
, version: '15.4' , version: '15.4'
, mac: true , mac: true
, a: true , a: true
}, },
'Mozilla/5.0 (Linux; Android 5.1.1; Nexus 5 Build/LMY48B) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.118 YaBrowser/15.4.2272.3608.00 Mobile Safari/537.36': { 'Mozilla/5.0 (Linux; Android 5.1.1; Nexus 5 Build/LMY48B) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.118 YaBrowser/15.4.2272.3608.00 Mobile Safari/537.36': {
yandexbrowser: true yandexbrowser: true
, android: true , android: true
, osversion: '5.1.1' , osversion: '5.1.1'
, mobile: true , mobile: true
, version: '15.4' , version: '15.4'
, webkit: true , blink: true
, a: true , a: true
} }
} }
, Safari: { , Safari: {
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.13+ (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2': { 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.13+ (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2': {
@ -1095,14 +1095,14 @@ module.exports.useragents = {
vivaldi: true vivaldi: true
, version: '1.0' , version: '1.0'
, mac: true , mac: true
, webkit: true , blink: true
, a: true , a: true
}, },
'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.99 Safari/537.36 Vivaldi/1.0.303.52': { 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.99 Safari/537.36 Vivaldi/1.0.303.52': {
vivaldi: true vivaldi: true
, version: '1.0' , version: '1.0'
, windows: true , windows: true
, webkit: true , blink: true
, a: true , a: true
} }
} }