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

#113 (browser) - Properly detect new Edge Chromium version as Edge instead of Chrome #115

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

mark-veenstra
Copy link

Platforms affected

browser

Motivation and Context

Allows the plugin to properly detect the new Edge browser based on Chromium.
#113

Description

The new Chromium based Edge browser exposed the following userAgent:

Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36 Edg/79.0.309.54

This change detects the browser as Edge instead of Chrome. And pulls the correct version.

Testing

On Edge and on Edge Chromium based execture the plugin and get the model and version

Checklist

  • I've run the tests to see all new and existing tests pass
  • I added automated test coverage as appropriate for this change
  • Commit is prefixed with (platform) if this change only applies to one platform (e.g. (android))
  • If this Pull Request resolves an issue, I linked to the issue in the text above (and used the correct keyword to close issues using keywords)
  • I've updated the documentation if necessary

Closes #113

@mark-veenstra
Copy link
Author

Any updates?

@domschmidt
Copy link

please review & merge asap =)

Copy link
Member

@timbru31 timbru31 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, the change won't work.

Screenshot 2020-03-26 at 15 15 10

if (getModel) {
returnVal = 'Edge';
} else {
if ((offset = userAgent.indexOf('Edge')) !== -1) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This won't work, as the offset might be set to -1 again and line 47 would return userAgent.substring(-1 + 4);

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.

New Edge browser based on Chromium not recognized correctly
4 participants