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

151
Visualizações
My chrome extension doesn't run at first time
"content_scripts": [
  {
    "matches": ["*://*.example.com/page2"],
    "js": ["contentScript.js"],
    "run_at": "document_idle"
  }
]

Well, the home page is "example.com/page1" that home page has a link <a href="/page2"></a> when I click at that link I would expected that my contentScript.js was injected at the page, but it doesn't happen, for that happens I need to refresh the page, only then contentScript.js works.

When I put at adress bar "example.com/page2" and search the contentScript.js works perfectly, but if I try to acess the page2 from the link that have at page1 it doesn't work, so I need to refresh the page.

I dont want to need refresh the page everytime. How do I fix it?

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