mirror of
https://github.com/lancedikson/bowser
synced 2024-10-27 20:34:22 +00:00
Added support for detection of Yandex.Browser.
This commit is contained in:
parent
e53c1db9eb
commit
47678762bd
@ -37,6 +37,13 @@
|
||||
, version: versionIdentifier || getFirstMatch(/(?:opera|opr)[\s\/](\d+(\.\d+)?)/i)
|
||||
}
|
||||
}
|
||||
else if (/yabrowser/i.test(ua)) {
|
||||
result = {
|
||||
name: 'Yandex Browser'
|
||||
, yandexbrowser: t
|
||||
, version: versionIdentifier || getFirstMatch(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)
|
||||
}
|
||||
}
|
||||
else if (/windows phone/i.test(ua)) {
|
||||
result = {
|
||||
name: 'Windows Phone'
|
||||
@ -223,6 +230,7 @@
|
||||
// http://developer.yahoo.com/yui/articles/gbs
|
||||
if (result.msedge ||
|
||||
(result.msie && result.version >= 10) ||
|
||||
(result.yandexbrowser && result.version >= 15) ||
|
||||
(result.chrome && result.version >= 20) ||
|
||||
(result.firefox && result.version >= 20.0) ||
|
||||
(result.safari && result.version >= 6) ||
|
||||
|
@ -252,6 +252,23 @@ module.exports.useragents = {
|
||||
, c: true
|
||||
}
|
||||
}
|
||||
, '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': {
|
||||
yandexbrowser: true
|
||||
, webkit: true
|
||||
, version: '15.4'
|
||||
, 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': {
|
||||
yandexbrowser: true
|
||||
, android: true
|
||||
, osversion: '5.1.1'
|
||||
, mobile: true
|
||||
, version: '15.4'
|
||||
, webkit: true
|
||||
, a: true
|
||||
}
|
||||
}
|
||||
, 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': {
|
||||
safari: true
|
||||
|
Loading…
Reference in New Issue
Block a user