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

192
Views
Abrir la extensión de Chrome programáticamente con múltiples puntos de entrada

Estoy abriendo una extensión de Chrome mediante programación desde el script de fondo con el siguiente código:

fondo.js

 chrome.windows.getLastFocused().then((window) => { const width = 600 + 100; const height = 400 + 100; const left = window.width - width; chrome.windows.create({url: "./index.html", type: "popup", height: height, width: width, left: left, focused: true}); });

Esto funciona perfectamente bien para ./index.html , pero no para ninguna otra ruta como ./approvals.html aunque esta página existe.

Navegar en la extensión con un enlace de index.html a aprobaciones.html funciona sin problemas, pero abrir directamente la extensión con esta ruta da como resultado ERR_FILE_NOT_FOUND .

Creo que podría estar relacionado con algunos permisos que faltan, siguiendo mi manifest.json:

 { "name": "Chrome React Extension", "description": "The power of React for building interactive Chrome extensions", "version": "1.0", "manifest_version": 3, "action": { "default_popup": "index.html", "default_title": "Open the popup" }, "permissions": [ "storage" ], "content_scripts": [ { "matches": ["<all_urls>"], "js": ["content.js"] } ], "background": { "service_worker": "background.js" } }

¡Cualquier ayuda es muy apreciada!

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