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

bug: Fix button download detect intel or apple silicon #609

Merged
merged 3 commits into from
Nov 13, 2023

Conversation

urmauur
Copy link
Member

@urmauur urmauur commented Nov 13, 2023

Base on this https://stackoverflow.com/questions/65146751/detecting-apple-silicon-mac-in-javascript and https://developer.mozilla.org/en-US/docs/Web/API/NavigatorUAData/getHighEntropyValues we can detect currently only chrome / browser with engine chromium eg : brave then will push default to apple-silicon

Result:

Brave:
Screenshot 2023-11-13 at 16 32 24

Chrome:
Screenshot 2023-11-13 at 16 32 18

Firefox:
Screenshot 2023-11-13 at 16 31 58

Safari:
Screenshot 2023-11-13 at 16 32 56

cc @louis-jan @0xSage @dan-jan

@urmauur urmauur requested a review from louis-menlo November 13, 2023 10:46
Comment on lines 77 to 79
userAgent.includes("Mac OS") &&
arc &&
arc.architecture !== "arm"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
userAgent.includes("Mac OS") &&
arc &&
arc.architecture !== "arm"
userAgent.includes("Mac OS")

@urmauur urmauur merged commit fb3a1d7 into main Nov 13, 2023
@urmauur urmauur deleted the fix/download-button-web branch November 13, 2023 15:03
@louis-menlo louis-menlo added the type: bug Something isn't working label Nov 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants