Skip to content

Commit

Permalink
Backport - Fix #681 - Add new browser: Vivo Browser (cherry picked fr…
Browse files Browse the repository at this point in the history
  • Loading branch information
faisalman committed Oct 27, 2023
1 parent 5a724cb commit 3b896d5
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ua-parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -270,9 +270,9 @@
/fxios\/([-\w\.]+)/i // Firefox for iOS
], [VERSION, [NAME, FIREFOX]], [
/\bqihu|(qi?ho?o?|360)browser/i // 360
], [[NAME, '360 '+BROWSER]], [
/(oculus|samsung|sailfish|huawei)browser\/([\w\.]+)/i
], [[NAME, /(.+)/, '$1 '+BROWSER], VERSION], [ // Oculus/Samsung/Sailfish/Huawei Browser
], [[NAME, '360' + SUFFIX_BROWSER]], [
/(oculus|samsung|sailfish|huawei|vivo)browser\/([\w\.]+)/i
], [[NAME, /(.+)/, '$1' + SUFFIX_BROWSER], VERSION], [ // Oculus/Samsung/Sailfish/HuaweiBrowser/VivoBrowser
/(comodo_dragon)\/([\w\.]+)/i // Comodo Dragon
], [[NAME, /_/g, ' '], VERSION], [
/(electron)\/([\w\.]+) safari/i, // Electron-based App
Expand Down
20 changes: 20 additions & 0 deletions test/browser-test.json
Original file line number Diff line number Diff line change
Expand Up @@ -1358,6 +1358,26 @@
"major" : "1"
}
},
{
"desc" : "Vivaldi on Mac",
"ua" : "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.88 Safari/537.36 Vivaldi/2.4.1488.36",
"expect" :
{
"name" : "Vivaldi",
"version" : "2.4.1488.36",
"major" : "2"
}
},
{
"desc" : "Vivo Browser",
"ua" : "Mozilla/5.0 (Linux; Android 13; 23049RAD8C; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/87.0.4280.141 Mobile Safari/537.36 VivoBrowser/16.7.1.1",
"expect" :
{
"name" : "Vivo Browser",
"version" : "16.7.1.1",
"major" : "16"
}
},
{
"desc" : "Viera",
"ua" : "HbbTV/1.2.1 (;Panasonic;VIERA 2015;3.014;a001-003 4000-0000;)",
Expand Down

0 comments on commit 3b896d5

Please sign in to comment.