Estoy haciendo una extensión de Chrome y sigo recibiendo este error: se Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'self'". Either the 'unsafe-inline' keyword, a hash que ya probé usando <meta> y otros métodos. (No estoy usando ningún script externo, por lo que otras publicaciones no se pueden usar) manifest.json:
{ "name": "Mini Embed", "description": "Opens a small version of a webpage", "version": "1.0", "manifest_version": 3, "action": { "default_popup": "index.html" } }índice.html:
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Security-Policy" content="default-src *; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval'"> <style> body { width: 320px; height: 169px; } #btn { background-color: #0bde19; } iframe { width: 300; height: 169; } </style> </head> <body> <script> var url; function run(){ url = document.getElementById("text").value; document.getElementById("iframe").src = "url"; } </script> <span> <button onclick="run" id="btn">Embed</button> <input id="text" placeholder="enter URL"> </span> </body> </html>