Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

154
Vistas
How do you make a chrome extension that loads page you typed in?

I am making a chrome extension, but when I try to get user input, and subsequently load the page, it throws an error:

Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'self' blob: filesystem:". Either the 'unsafe-inline' keyword, a hash ('sha256-FXypLyAT7wJfhWBTVrCbeUAS8Y801HSs7d9LQUHi6aQ='), or a nonce ('nonce-...') is required to enable inline execution.

popup.html:

<!doctype html>
<html>
  <head>
    <script>
      function connect() {
    console.log(document.getElementById('url').value);
  var urlValue = document.getElementById('url').value;
  chrome.tabs.update({
 url: urlValue
});
}
    </script>
  </head>
  <body>
      <input type="url" name="url" id="url" placeholder="http://google.com" required></input>
      <button onclick="connect()">Connect</button>
</body>
</html>

manifest.json:

 {
  "manifest_version": 2,

  "name": "extension",
  "description": "extension",
  "version": "1.0",

  "browser_action": {
   "default_icon": "icon.png",
   "default_popup": "popup.html"
  },
  "permissions": [
   "activeTab"
   ]
}
about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda