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

306
Vistas
How to open an extension from javascript?

is it possible to launch an extension from javascript?

for example in my code i check if a specific keyword is in the url with:

let keyword = "xyz"

if (window.location.href.indexOf("keyword") > -1) {
            window.location.replace("https://www.google.com/");
        }

and if it is in the url, i get redirect to google.com

the problem is that if i try to open my index.html, it opens it as a website instead of an extension popup

so how can you open it as an extension, if you can?

thanks

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

You need to use chrome.runtime.getURL('path/to/file').

https://developer.chrome.com/docs/extensions/reference/runtime/#method-getURL

Also keep the web_accessible_resources in your manifest.json in mind when using this.

https://developer.chrome.com/docs/extensions/mv3/manifest/web_accessible_resources/

about 4 years ago · Juan Pablo Isaza Denunciar
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