Skip to content

Commit 9da7fd4

Browse files
committed
Fix #395: Add 360 Browser
1 parent 5cbd2fa commit 9da7fd4

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

src/ua-parser.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,9 @@
345345
/(dolfin)\/([\w\.]+)/i // Dolphin
346346
], [[NAME, 'Dolphin'], VERSION], [
347347

348+
/(qihu|qhbrowser|qihoobrowser|360browser)/i // 360
349+
], [[NAME, '360 Browser']], [
350+
348351
/((?:android.+)crmo|crios)\/([\w\.]+)/i // Chrome for Android/iOS
349352
], [[NAME, 'Chrome'], VERSION], [
350353

test/browser-test.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
11
[
2+
{
3+
"desc" : "360 Browser on iOS",
4+
"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",
5+
"expect" :
6+
{
7+
"name" : "360 Browser",
8+
"version" : "undefined",
9+
"major" : "undefined"
10+
}
11+
},
212
{
313
"desc" : "Android Browser on Galaxy Nexus",
414
"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",

0 commit comments

Comments
 (0)