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

297
Vistas
Re-enabling right-click on web page: "Void document oncontextmenu null" trick not working

For testing purposes, I have disabled the right click function on a web page by adding the following JavaScript snippet code:

document.addEventListener('contextmenu', event => event.preventDefault());

So far, so good.

Now, to re-enable the option using a code method, it is supposed to be enough to just type javascript:void(document.oncontextmenu=null); in the address bar of your Browser and press Enter. But this method seems not be working anymore. I do not know what is wrong with it and wonder if there is any similar alternative way, except toggling off JavaScript in Chrome?

about 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

addEventListener() method can be removed with removeEventListener() method only

If you need your code working you need to assign the event with the oncontextmenu property

I mean that

document.oncontextmenu = (event) => {
  event.preventDefault();
}

It will work.

about 4 years ago · Santiago Trujillo 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