Greasy Fork is available in English.

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().

< Spätná väzba na Disallow console.clear

Otázka/komentár

§
Pridaný: 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 = () => {};
}());
§
Pridaný: 27.01.2025

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

brian6932Autor
§
Pridaný: 16.04.2025

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

Pridať odpoveď

Aby ste mohli pridať odpoveď, prihláste sa.