Skip to content

Commit 3b896d5

Browse files
committed
Backport - Fix #681 - Add new browser: Vivo Browser (cherry picked from commit 125f0d9)
https://play.google.com/store/apps/details?id=com.vivo.browser
1 parent 5a724cb commit 3b896d5

File tree

2 files changed

+23
-3
lines changed

2 files changed

+23
-3
lines changed

src/ua-parser.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -270,9 +270,9 @@
270270
/fxios\/([-\w\.]+)/i // Firefox for iOS
271271
], [VERSION, [NAME, FIREFOX]], [
272272
/\bqihu|(qi?ho?o?|360)browser/i // 360
273-
], [[NAME, '360 '+BROWSER]], [
274-
/(oculus|samsung|sailfish|huawei)browser\/([\w\.]+)/i
275-
], [[NAME, /(.+)/, '$1 '+BROWSER], VERSION], [ // Oculus/Samsung/Sailfish/Huawei Browser
273+
], [[NAME, '360' + SUFFIX_BROWSER]], [
274+
/(oculus|samsung|sailfish|huawei|vivo)browser\/([\w\.]+)/i
275+
], [[NAME, /(.+)/, '$1' + SUFFIX_BROWSER], VERSION], [ // Oculus/Samsung/Sailfish/HuaweiBrowser/VivoBrowser
276276
/(comodo_dragon)\/([\w\.]+)/i // Comodo Dragon
277277
], [[NAME, /_/g, ' '], VERSION], [
278278
/(electron)\/([\w\.]+) safari/i, // Electron-based App

test/browser-test.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1358,6 +1358,26 @@
13581358
"major" : "1"
13591359
}
13601360
},
1361+
{
1362+
"desc" : "Vivaldi on Mac",
1363+
"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",
1364+
"expect" :
1365+
{
1366+
"name" : "Vivaldi",
1367+
"version" : "2.4.1488.36",
1368+
"major" : "2"
1369+
}
1370+
},
1371+
{
1372+
"desc" : "Vivo Browser",
1373+
"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",
1374+
"expect" :
1375+
{
1376+
"name" : "Vivo Browser",
1377+
"version" : "16.7.1.1",
1378+
"major" : "16"
1379+
}
1380+
},
13611381
{
13621382
"desc" : "Viera",
13631383
"ua" : "HbbTV/1.2.1 (;Panasonic;VIERA 2015;3.014;a001-003 4000-0000;)",

0 commit comments

Comments
 (0)