Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(browser): add detection for Miui Browser #436

Merged
merged 2 commits into from
Sep 12, 2020

Conversation

willamesoares
Copy link
Contributor

Overview

This adds support for detecting Xiaomi MiuiBrowser requested in #433

Test

// window.navigator.userAgent is:
// "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-"

const Bowser = require("bowser");
console.log(Bowser.parse(window.navigator.userAgent));

outputs

{
  browser: { name: 'Miui', version: '11.9.3' },
  os: { name: 'Android', version: '9', versionName: 'Pie' },
  platform: { type: 'mobile' },
  engine: { name: 'Blink' }
}

@coveralls
Copy link

coveralls commented Aug 23, 2020

Pull Request Test Coverage Report for Build 958

  • 5 of 5 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.07%) to 90.587%

Totals Coverage Status
Change from base Build 948: 0.07%
Covered Lines: 581
Relevant Lines: 594

💛 - Coveralls

@Nigui
Copy link

Nigui commented Sep 7, 2020

@lancedikson can we have this PR merged with main repo ?

@lancedikson
Copy link
Collaborator

@Nigui, yes, sure. Sorry for the delay. Will merge and release it soon!

@lancedikson lancedikson merged commit 444c54a into bowser-js:master Sep 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants