Skip to content

Commit

Permalink
Backport - Add new browsers: Wolvic & Pico Browser
Browse files Browse the repository at this point in the history
(cherry picked from commit f7810db)
  • Loading branch information
faisalman committed Sep 10, 2024
1 parent ab97f70 commit 241eb47
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/ua-parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,8 @@
], [[NAME, '360' + SUFFIX_BROWSER]], [
/\b(qq)\/([\w\.]+)/i // QQ
], [[NAME, /(.+)/, '$1Browser'], VERSION], [
/(oculus|sailfish|huawei|vivo)browser\/([\w\.]+)/i
], [[NAME, /(.+)/, '$1 ' + BROWSER], VERSION], [ // Oculus/Sailfish/HuaweiBrowser/VivoBrowser
/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i
], [[NAME, /(.+)/, '$1' + SUFFIX_BROWSER], VERSION], [ // Oculus/Sailfish/HuaweiBrowser/VivoBrowser/PicoBrowser
/samsungbrowser\/([\w\.]+)/i // Samsung Internet
], [VERSION, [NAME, SAMSUNG + ' Internet']], [
/(comodo_dragon)\/([\w\.]+)/i // Comodo Dragon
Expand Down Expand Up @@ -340,6 +340,8 @@
// Gecko based
/(navigator|netscape\d?)\/([-\w\.]+)/i // Netscape
], [[NAME, 'Netscape'], VERSION], [
/(wolvic)\/([\w\.]+)/i // Wolvic
], [NAME, VERSION], [
/mobile vr; rv:([\w\.]+)\).+firefox/i // Firefox Reality
], [VERSION, [NAME, FIREFOX+' Reality']], [
/ekiohf.+(flow)\/([\w\.]+)/i, // Flow
Expand Down
30 changes: 30 additions & 0 deletions test/browser-test.json
Original file line number Diff line number Diff line change
Expand Up @@ -888,6 +888,26 @@
"major" : "5"
}
},
{
"desc" : "PicoBrowser",
"ua" : "Mozilla/5.0 (X11; Linux x86_64; Pico Neo3 Link OS5.8.4.0 like Quest) AppleWebKit/537.36 (KHTML, like Gecko) PicoBrowser/3.3.22 Chrome/105.0.5195.68 VR Safari/537.36",
"expect" :
{
"name" : "PicoBrowser",
"version" : "3.3.22",
"major" : "3"
}
},
{
"desc" : "PicoBrowser",
"ua" : "Mozilla/5.0 (X11; Linux x86_64; PICO 4 OS5.4.0 like Quest) AppleWebKit/537.36 (KHTML, like Gecko) PicoBrowser/3.3.22 Chrome/105.0.5195.68 VR Safari/537.36 OculusBrowser/7.0",
"expect" :
{
"name" : "PicoBrowser",
"version" : "3.3.22",
"major" : "3"
}
},
{
"desc" : "Rekonq",
"ua" : "Mozilla/5.0 (X11; U; Linux x86_64; cs-CZ) AppleWebKit/533.3 (KHTML, like Gecko) rekonq Safari/533.3",
Expand Down Expand Up @@ -1709,6 +1729,16 @@
"major" : "0"
}
},
{
"desc" : "Wolvic",
"ua" : "Mozilla/5.0 (Android 12; Mobile VR; rv:121.0) Gecko/121.0 Firefox/121.0 Wolvic/1.6.1",
"expect" :
{
"name" : "Wolvic",
"version" : "1.6.1",
"major" : "1"
}
},
{
"desc" : "Yandex",
"ua" : "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/536.5 (KHTML, like Gecko) YaBrowser/1.0.1084.5402 Chrome/19.0.1084.5402 Safari/536.5",
Expand Down

0 comments on commit 241eb47

Please sign in to comment.