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

Platform parsing will soon break on Chrome #123

Open
jamesarosen opened this issue Oct 20, 2022 · 0 comments
Open

Platform parsing will soon break on Chrome #123

jamesarosen opened this issue Oct 20, 2022 · 0 comments

Comments

@jamesarosen
Copy link

Version 3.3.2 of copy-to-clipboard has the following code:

var copyKey = (/mac os x/i.test(navigator.userAgent) ? "⌘" : "Ctrl") + "+C";

This emits a warning on Chrome:

Audit usage of navigator.userAgent, navigator.appVersion, and navigator.platform

Soon, Chrome will stop providing details in navigator.userAgent (for client-side) and will not pass user-agent details in the User-Agent header (for server-side). Instead, copy-to-clipboard should use navigator.userAgentData.platform client-side and the Sec-CH-UA-Platform header server-side.

See https://web.dev/migrate-to-ua-ch/
See #39

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

No branches or pull requests

1 participant