• Jobs
  • About Us
  • professionals
    • Home
    • Jobs
    • Courses and challenges
  • business
    • Home
    • Post vacancy
    • Our process
    • Pricing
    • Assessments
    • Payroll
    • Blog
    • Sales
    • Salary Calculator

0

121
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 3 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 Our process Sales
Legal
Terms and conditions Privacy policy
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Recommend me some offers
I have an error