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

cannot use in browser extension environment #60

Open
LXS2000 opened this issue Jul 7, 2023 · 0 comments
Open

cannot use in browser extension environment #60

LXS2000 opened this issue Jul 7, 2023 · 0 comments

Comments

@LXS2000
Copy link

LXS2000 commented Jul 7, 2023

when i used user-agents in browser extension environment (manifest v3,execute in background worker):
const userAgent = new UserAgent({deviceCategory: ‘desktop’}).data
i got a error like this :
Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'self' 'wasm-unsafe-eval' 'inline-speculation-rules' http://localhost:* http://127.0.0.1:*".
It looks related to browser content_security_policy ,and chrome does not support to set ‘unsafe-eval’ in extension manifest.json file。
as mentioned above,this library cannot be used in the browser extension environment

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