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

165
Views
Firefox extension: apply content_scripts on all web pages but css on specific web page?

I have a Firefox extension where I want to apply contentScript.js to all web pages. The manifest.json looks like this:

  "content_scripts": [
    {
      "matches": ["http://*/*", "https://*/*"],
      "css": ["background.css"],
      "js":["contentScript.js"]
    }
  ]

However, I only want the CSS to be applied to a certain web page. Right now the CSS is applied to all web pages.

How can I solve this?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

My friend came up with a solution, change your manifest file to this:

  "content_scripts": [
    {
      "matches": ["http://*/*", "https://*/*"],
      "js":["contentScript.js"]
    },
    {
      "matches": ["*://*.website.org/*"],
      "css": ["background.css"]
    }
  ]

Life saver.

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