user-agents icon indicating copy to clipboard operation
user-agents copied to clipboard

cannot use in browser extension environment

Open LXS2000 opened this issue 1 year ago • 0 comments

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

LXS2000 avatar Jul 07 '23 06:07 LXS2000