Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

136
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda