-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Add Daum app user agent #773
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @HyewonKkang, Thank you for contributing to this project!
- Please commit only the source files and tests. You can omit the
.mjs
files as they will be autogenerated. - The value in the
Browser
enum should match with the browser name in the result:
import { UAParser } from 'ua-parser-js';
import { Browser } from 'ua-parser-js/enums';
const result = UAParser(navigator.userAgent);
// string comparison must be the same
if (result.browser.name == Browser.DAUM) {
console.log('You are using Daum app');
}
@faisalman |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, thanks for following up, but this issue still hasn't been addressed:
* The value in the `Browser` enum should match with the browser name in the result:
// string comparison must be the same if (result.browser.name == Browser.DAUM) {
You can change the captured string into, for example:
/(daum)apps[\/ ]([\w\.]+)/i,
So both of them will match
@faisalman |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change the value in the test files as well and run npm test
to make sure that the change is all good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All seems good now, thanks!
Prerequisites
Type of Change
enhancement
Description
application download link: google play, apple apps
Test
Impact
Breaking Changes: None
User Actions: No changes required, backward compatibility maintained
Other Info