diff --git a/src/bowser.js b/src/bowser.js index dcbcca5..6942aea 100644 --- a/src/bowser.js +++ b/src/bowser.js @@ -24,6 +24,7 @@ var iosdevice = getFirstMatch(/(ipod|iphone|ipad)/i).toLowerCase() , likeAndroid = /like android/i.test(ua) , android = !likeAndroid && /android/i.test(ua) + , chromeBook = /CrOS/.test(ua) , edgeVersion = getFirstMatch(/edge\/(\d+(\.\d+)?)/i) , versionIdentifier = getFirstMatch(/version\/(\d+(\.\d+)?)/i) , tablet = /tablet/i.test(ua) @@ -64,8 +65,14 @@ , msie: t , version: getFirstMatch(/(?:msie |rv:)(\d+(\.\d+)?)/i) } - } - else if (/chrome.+? edge/i.test(ua)) { + } else if (chromeBook) { + result = { + name: 'Chrome' + , chromeBook: t + , chrome: t + , version: getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i) + } + } else if (/chrome.+? edge/i.test(ua)) { result = { name: 'Microsoft Edge' , msedge: t diff --git a/src/useragents.js b/src/useragents.js index a4c518e..9a4263a 100644 --- a/src/useragents.js +++ b/src/useragents.js @@ -86,6 +86,7 @@ module.exports.useragents = { } , 'Mozilla/5.0 (X11; CrOS i686 4319.74.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.57 Safari/537.36': { chrome: true + , chromeBook: true , version: '29.0' , webkit: true , a: true