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

144
Views
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
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!