diff --git a/README.md b/README.md index e5e3171..f17f21a 100644 --- a/README.md +++ b/README.md @@ -119,6 +119,7 @@ If detected, one of these flags may be set to true. The rendering engine flag i * `android` - native browser - [`webkit`|`blink`] * `ios` - native browser - [`webkit`] * `opera` - [`blink` if >=15] + * `samsungBrowser` - [`blink`] * `phantom` - [`webkit`] * `blackberry` - native browser - [`webkit`] * `webos` - native browser - [`webkit`] diff --git a/src/bowser.js b/src/bowser.js index a6059c2..9062bf8 100644 --- a/src/bowser.js +++ b/src/bowser.js @@ -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) || diff --git a/src/useragents.js b/src/useragents.js index dd7fb25..2303d08 100644 --- a/src/useragents.js +++ b/src/useragents.js @@ -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 + } + } }