From 5bf468659a3729043d0928a2cd8b78d7684a2880 Mon Sep 17 00:00:00 2001 From: Denis Demchenko Date: Thu, 30 Jun 2016 21:12:44 +0300 Subject: [PATCH] fix type detection of chromium browsers fix #142 --- src/bowser.js | 2 ++ src/useragents.js | 9 ++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/bowser.js b/src/bowser.js index c76c4cc..190f457 100644 --- a/src/bowser.js +++ b/src/bowser.js @@ -377,6 +377,7 @@ (result.opera && result.version >= 10.0) || (result.ios && result.osversion && result.osversion.split(".")[0] >= 6) || (result.blackberry && result.version >= 10.1) + || (result.chromium && result.version >= 20) ) { result.a = t; } @@ -386,6 +387,7 @@ (result.safari && result.version < 6) || (result.opera && result.version < 10.0) || (result.ios && result.osversion && result.osversion.split(".")[0] < 6) + || (result.chromium && result.version < 20) ) { result.c = t } else result.x = t diff --git a/src/useragents.js b/src/useragents.js index 0ffea38..dd7fb25 100644 --- a/src/useragents.js +++ b/src/useragents.js @@ -1245,7 +1245,14 @@ module.exports.useragents = { , chromium: true , version: '35.0' , blink: true - , x: true + , a: true + } + , 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/50.0.2661.102 Chrome/50.0.2661.102 Safari/537.36': { + chromium: true + , a: true + , version: '50.0' + , linux: true + , blink: true } } , 'SlimerJS' : {