Skip to content

Commit

Permalink
Backport - Fix #683 - change MetaSr into Sogou Explorer (+add Sogou M…
Browse files Browse the repository at this point in the history
…obile) (cherry picked from commit 69ed6ce)
  • Loading branch information
faisalman committed Oct 27, 2023
1 parent ea2c829 commit 57d1ac0
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/ua-parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -275,11 +275,14 @@
], [[NAME, /(.+)/, '$1 ' + BROWSER], VERSION], [ // Oculus/Samsung/Sailfish/HuaweiBrowser/VivoBrowser
/(comodo_dragon)\/([\w\.]+)/i // Comodo Dragon
], [[NAME, /_/g, ' '], VERSION], [
/metasr[\/ ]?([\d\.]+)/i // Sogou Explorer
], [VERSION, [NAME, 'Sogou Explorer']], [
/(sogou)mo\w+\/([\d\.]+)/i // Sogou Mobile
], [[NAME, 'Sogou Mobile'], VERSION], [
/(electron)\/([\w\.]+) safari/i, // Electron-based App
/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i, // Tesla
/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i // QQBrowser/Baidu App/2345 Browser
], [NAME, VERSION], [
/(metasr)[\/ ]?([\w\.]+)/i, // SouGouBrowser
/(lbbrowser)/i, // LieBao Browser
/\[(linkedin)app\]/i // LinkedIn App for iOS & Android
], [NAME], [
Expand Down
14 changes: 13 additions & 1 deletion test/browser-test.json
Original file line number Diff line number Diff line change
Expand Up @@ -1663,7 +1663,19 @@
"ua" : "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.221 Safari/537.36 SE 2.X MetaSr 1.0",
"expect" :
{
"name" : "MetaSr"
"name" : "Sogou Explorer",
"version" : "1.0",
"major" : "1"
}
},
{
"desc" : "Sogou Mobile Browser",
"ua" : "Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_2 like Mac OS X) AppleWebKit/603.2.4 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30 SogouMSE,SogouMobileBrowser/3.7.4",
"expect" :
{
"name" : "Sogou Mobile",
"version" : "3.7.4",
"major" : "3"
}
},
{
Expand Down

0 comments on commit 57d1ac0

Please sign in to comment.