2
votes

i want to add google api in my popup.html but there is an error in cosole "Refused to load the script 'https://apis.google.com/js/api.js' because it violates the following Content Security Policy directive: "script-src 'self' 'unsafe-eval' https://cdn.jsdelivr.net". Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback". can someone help me please? in manifest i have added

"content_security_policy": "script-src 'self' https://apis.google.com/js/api.js; object-src 'self'",

but it does not work. please help me, thanks in advance

add this line in your manifest file "content_security_policy": "script-src 'self' https://apis.google.com/js/api.js 'unsafe-eval'; object-src 'self'", - Noob dev
There is a great video here for Manifest V3. youtube.com/watch?v=UjH2INUPmF4&ab_channel=RustyZone - Jason Allshorn