Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

135
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda