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

Merge branch 'eb_samsungBrowser' of https://github.com/eriben/bowser into eriben-eb_samsungBrowser

This commit is contained in:
Denis Demchenko 2016-08-30 00:17:37 +03:00
commit 21b9e617a1
2 changed files with 20 additions and 0 deletions

View File

@ -38,6 +38,7 @@
, tizen = /tizen/i.test(ua)
, webos = /(web|hpw)os/i.test(ua)
, windowsphone = /windows phone/i.test(ua)
, samsungBrowser = /SamsungBrowser/i.test(ua)
, windows = !windowsphone && /windows/i.test(ua)
, mac = !iosdevice && !silk && /macintosh/i.test(ua)
, linux = !android && !sailfish && !tizen && !webos && /linux/i.test(ua)
@ -55,6 +56,13 @@
, version: versionIdentifier || getFirstMatch(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)
}
}
else if (/SamsungBrowser/i.test(ua)) {
result = {
name: 'Samsung Internet for Android'
, samsungBrowser: t
, version: versionIdentifier || getFirstMatch(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)
}
}
else if (/coast/i.test(ua)) {
result = {
name: 'Opera Coast'
@ -372,6 +380,7 @@
(result.yandexbrowser && result.version >= 15) ||
(result.vivaldi && result.version >= 1.0) ||
(result.chrome && result.version >= 20) ||
(result.samsungBrowser && result.version >= 4) ||
(result.firefox && result.version >= 20.0) ||
(result.safari && result.version >= 6) ||
(result.opera && result.version >= 10.0) ||

View File

@ -1264,4 +1264,15 @@ module.exports.useragents = {
, x: true
}
}
, 'Samsung Internet for Android' : {
'Mozilla/5.0 (Linux; Android 5.0.2; SAMSUNG SM-G925F Build/LRX22G) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/4.0 Chrome/44.0.2403.133 Mobile Safari/537.36': {
mobile: true
, android: true
, osversion: '5.0.2'
, samsungBrowser: true
, version: '4.0'
, a: true
, blink: true
}
}
}