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

211
Vistas
Chrome Manifest v3 block redirect

The scenario is that on a given page, I want to block the browser from redirecting the user to a different page via a chrome extension on manifest v3.

I am listening to redirect events via onBeforeRedirect, but the blocking version of webRequest seems to be deprecated in manifest v3. Chrome seems to recommend declarativeNetRequest instead, but the rules seem much more rigid.

For example, if I wanted to stop a redirect to google.com, I could add a rule like:

{
  "id" : 1,
  "priority": 1,
  "action" : { "type" : "block" },
  "condition" : {
    "urlFilter" : "abc",
    "domains" : ["google.com"],
    "resourceTypes" : ["script"]
  }
}

but I still wanted the user to be able visit google.com if they weren't being redirected there. This will block all attempts to go to google.com.

How can I block only redirect events to a given site?

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