diff --git a/src/bowser.js b/src/bowser.js index 6547b0d..1da5331 100644 --- a/src/bowser.js +++ b/src/bowser.js @@ -16,6 +16,11 @@ return (match && match.length > 1 && match[1]) || ''; } + function getSecondMatch(regex) { + var match = ua.match(regex); + return (match && match.length > 1 && match[2]) || ''; + } + var iosdevice = getFirstMatch(/(ipod|iphone|ipad)/i).toLowerCase() , likeAndroid = /like android/i.test(ua) , android = !likeAndroid && /android/i.test(ua) @@ -142,7 +147,12 @@ , version: versionIdentifier } } - else result = {} + else { + result = { + name: getFirstMatch(/^(.*)\/(.*) /), + version: getSecondMatch(/^(.*)\/(.*) /) + }; + } // set webkit or gecko flag for browsers based on these engines if (/(apple)?webkit/i.test(ua)) { diff --git a/src/useragents.js b/src/useragents.js index eaa0ab7..ba36d1c 100644 --- a/src/useragents.js +++ b/src/useragents.js @@ -931,4 +931,11 @@ module.exports.useragents = { , x: true } } + , Generic: { + 'Generic/2.15 libww': { + name: 'Generic' + , version: '2.15' + , x: true + } + } };