Disallow console.clear

Self explanatory. As of Firefox 117, you can just use the `Enable persistent logs` feature in devtools, it now disables console.clear().

< Opiniones de Disallow console.clear

Pregunta o comentario

§
Publicado: 26/01/2025
// ==UserScript==
// @name          Prevent console.clear
// @description   Replaces console.clear with a function that does nothing
// @version       1
// @match         *://*/*
// @grant         unsafeWindow
// @run-at        document-start
// ==/UserScript==

(function() {
  unsafeWindow.console.clear = () => {};
}());
§
Publicado: 27/01/2025

Nevermind, this code also doesn't work at the place I need

brian6932Autor
§
Publicado: 16/04/2025

I'm not sure what the issue was here, but I could make this a little stricter.

Publicar respuesta

Inicia sesión para responder.