Skip to content

Commit

Permalink
Merge d5fe565 into d1a6532
Browse files Browse the repository at this point in the history
  • Loading branch information
willamesoares committed Aug 23, 2020
2 parents d1a6532 + d5fe565 commit 79b7791
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/parser-browsers.js
Original file line number Diff line number Diff line change
Expand Up @@ -561,6 +561,21 @@ const browsersList = [
return browser;
},
},
{
test: [/MiuiBrowser/i],
describe(ua) {
const browser = {
name: 'Miui',
};
const version = Utils.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i, ua);

if (version) {
browser.version = version;
}

return browser;
},
},
{
test: [/chromium/i],
describe(ua) {
Expand Down
15 changes: 15 additions & 0 deletions test/acceptance/useragentstrings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3026,3 +3026,18 @@
type: "desktop"
engine:
name: "Blink"
Miui:
-
ua: "Mozilla/5.0 (Linux; U; Android 9; fr-fr; Redmi Note 8 Pro Build/PPR1.180610.011) AppleWebKit/537.36 (KHTML like Gecko) Version/4.0 Chrome/71.0.3578.141 Mobile Safari/537.36 XiaoMi/MiuiBrowser/11.9.3-"
spec:
browser:
name: "Miui"
version: "11.9.3"
os:
name: "Android"
version: "9"
versionName: "Pie"
platform:
type: "mobile"
engine:
name: "Blink"

0 comments on commit 79b7791

Please sign in to comment.