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

140
Views
Intercept requests going from the sidebar panel

Firefox allows us to apply filters like tabId, urls to requests before intercepting them using webRequest.RequestFilter

So far so good. The problem is this code

browser.sidebarAction.setPanel({
    panel: 'https://google.com'
});

Here we are requesting a web page that will be loaded into the sidebar (I want to intercept that request only)

As you can see it seems that there's no way to only filter sidebars' requests since even tabId will return the same id as the "parent" tab

Is it really possible to intercept requests going from the sidebar panel only?

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

0

We can filter requests that aren't related to a tab by setting tabId to -1

browser.webRequest.onBeforeSendHeaders.addListener(
  listener,
  {
      urls: ["<all_urls>"],
      tabId: -1
  },
  ["blocking", "requestHeaders"]
);

This now matches our sidebar's requests

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!