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

Updated the check for generic browsers

This commit is contained in:
Ricardo Rauber Pereira 2019-04-05 18:18:39 +01:00
parent f1bdd50116
commit 3bfb24c8cb
2 changed files with 12 additions and 2 deletions

View File

@ -590,9 +590,10 @@ const browsersList = [
{ {
test: [/.*/i], test: [/.*/i],
describe(ua) { describe(ua) {
const regexp = ua.search("\\(") == -1 ? /^(.*)\/(.*) / : /^(.*)\/(.*)\((.*) /
return { return {
name: Utils.getFirstMatch(/^(.*)\/(.*)\((.*) /, ua), name: Utils.getFirstMatch(regexp, ua),
version: Utils.getSecondMatch(/^(.*)\/(.*)\((.*) /, ua), version: Utils.getSecondMatch(regexp, ua),
}; };
}, },
}, },

View File

@ -2216,6 +2216,15 @@
engine: engine:
name: "Blink" name: "Blink"
Generic: Generic:
-
ua: "Generic/2.15 libww"
spec:
browser:
name: "Generic"
version: "2.15"
os: {}
platform: {}
engine: {}
- -
ua: "Generic/2.15 (Macintosh; Intel Mac OS X 10_6_8)" ua: "Generic/2.15 (Macintosh; Intel Mac OS X 10_6_8)"
spec: spec: