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

220
Views
How to convert match patterns in extension manifests to Regular Expression?

In my application manifest I have declared in the content_scripts the matches for valid URLs where the extension should be allowed to run

"content_scripts": [
    {
      "matches": ["*://*.creoweb.com/data/", "*://*.creoweb.com/cp/*/history/","*://*.creoweb.com/user/*/panel/"],      
      "js": ["content_scripts/core.js"]
    }
  ]

In my code I have something like this:

const filter = {
  url:
  [
    {urlMatches: "*://*.creoweb.com/data/"},
    {urlMatches: "*://*.creoweb.com/cp/*/history/"},
    {urlMatches: "*://*.creoweb.com/user/*/panel/"}
  ]
}

function logOnCompleted(details) {
  console.log(`onCompleted: ${details.url}`);
}

browser.webNavigation.onCompleted.addListener(logOnCompleted, filter);

I think that the listener wants RegEx to work, in fact I'm not getting any console log output using this.

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!