Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

303
Views
¿Cómo abrir una extensión desde javascript?

¿Es posible lanzar una extensión desde javascript?

por ejemplo, en mi código compruebo si una palabra clave específica está en la URL con:

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

y si está en la URL, me redirigen a google.com

el problema es que si trato de abrir mi index.html, lo abre como un sitio web en lugar de una ventana emergente de extensión

Entonces, ¿cómo puedes abrirlo como una extensión, si puedes?

Gracias

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Debe usar chrome.runtime.getURL('path/to/file') .

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

También tenga en cuenta web_accessible_resources en su manifest.json cuando use esto.

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

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!