Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

189
Visualizações
Opening chrome extension programmatically with multiple entry points

I'm opening a chrome extension programmatically from the background script with the following code:

background.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});
}); 

This works perfectly fine for ./index.html, but not for any other path like ./approvals.html although this page exists.

Navigating in the extension with a link from index.html to approvals.html works smooth, but directly opening the extension with this path results in ERR_FILE_NOT_FOUND.

I think it might be related to some missing permissions, following my 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"
    }
}

Any help is really appreciated!

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda