Skip to content

Commit

Permalink
Fix #395: Add 360 Browser
Browse files Browse the repository at this point in the history
  • Loading branch information
faisalman committed Dec 14, 2019
1 parent 5cbd2fa commit 9da7fd4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/ua-parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,9 @@
/(dolfin)\/([\w\.]+)/i // Dolphin
], [[NAME, 'Dolphin'], VERSION], [

/(qihu|qhbrowser|qihoobrowser|360browser)/i // 360
], [[NAME, '360 Browser']], [

/((?:android.+)crmo|crios)\/([\w\.]+)/i // Chrome for Android/iOS
], [[NAME, 'Chrome'], VERSION], [

Expand Down
10 changes: 10 additions & 0 deletions test/browser-test.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
[
{
"desc" : "360 Browser on iOS",
"ua" : "Mozilla/5.0 (iPhone; CPU iPhone OS 12_4_1 like Mac OS X) AppleWebKit/607.3.9 (KHTML, like Gecko) Mobile/16G102 QHBrowser/317 QihooBrowser/4.0.10",
"expect" :
{
"name" : "360 Browser",
"version" : "undefined",
"major" : "undefined"
}
},
{
"desc" : "Android Browser on Galaxy Nexus",
"ua" : "Mozilla/5.0 (Linux; U; Android 4.0.2; en-us; Galaxy Nexus Build/ICL53F) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30",
Expand Down

0 comments on commit 9da7fd4

Please sign in to comment.