Skip to content

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-jan 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects
Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants