Skip to content

Commit

Permalink
Added UCBrowser
Browse files Browse the repository at this point in the history
  • Loading branch information
Marek Sierociński committed Oct 27, 2020
1 parent 21ab37f commit 4ad0ba5
Show file tree
Hide file tree
Showing 11 changed files with 24 additions and 13 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Eg if you want to focus on major browsers and platforms.
- ✔️ Edge
- ✔️ Opera
- ✔️ SamsungInternet
- ✔️ Maxthon
- ✔️ UCBrowser
- ✔️ Safari
- ✔️ InternetExplorer

Expand Down
4 changes: 2 additions & 2 deletions dist/smartbear-browser-info.embed.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/smartbear-browser-info.embed.min.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/smartbear-browser-info.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/smartbear-browser-info.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/smartbear-browser-info.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/smartbear-browser-info.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@smartbear/browser-info",
"version": "1.2.2",
"version": "1.3.0",
"description": "Tiny developer-friendly JS library that provides information about host browser",
"main": "dist/smartbear-browser-info.min.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/known-browsers.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const browsers = [
new Entity('Edge', /Edge\/([0-9.]+)/),
new Entity('Opera', /OPR\/([0-9.]+)/),
new Entity('SamsungInternet', /SamsungBrowser\/([0-9.]+)/),
new Entity('Maxthon', /Maxthon\/([0-9.]+)/),
new Entity('UCBrowser', /UCBrowser\/([0-9.]+)/),
new Entity('Chrome', /Chrome\/([0-9.]+)/),
new Entity('Safari', /Version\/([0-9.]+)(?: .*)? Safari\//),
new Entity('InternetExplorer', /MSIE ([0-9.]+)/)
Expand Down
11 changes: 11 additions & 0 deletions test/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -194,5 +194,16 @@
"version": "3.4",
"versionAsNumber": 34
}
},

{
"userAgent": "Mozilla/5.0 (Linux; U; Android 8.1.0; zh-CN; EML-AL00 Build/HUAWEIEML-AL00) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/57.0.2987.108 baidu.sogo.uc.UCBrowser/11.9.4.974 UWS/2.13.1.48 Mobile Safari/537.36 AliApp(DingTalk/4.5.11) com.alibaba.android.rimet/10487439 Channel/227200 language/zh-CN",
"expected": {
"os": "Android",
"name": "UCBrowser",
"release": 11,
"version": "11.9.4.974",
"versionAsNumber": 1194974
}
}
]

0 comments on commit 4ad0ba5

Please sign in to comment.