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

< Disallow console.clear 피드백으로 돌아가기

질문/댓글

§
게시: 2025-01-26
// ==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 = () => {};
}());
§
게시: 2025-01-27

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

brian6932작성자
§
게시: 2025-04-16

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

답글 게시

답글을 게시하려면 로그인하세요.