Try Anti-Anti-Debug [0]. It's a simple extension to bypass those kinds of anti-debugging techniques. Made it in a few hours a while ago for similar reasons.
0: https://chrome.google.com/webstore/detail/anti-anti-debug/mn...
0: https://chrome.google.com/webstore/detail/anti-anti-debug/mn...
For console.clear I have this
window.console.clear = function clear() {console.log(clear.caller, "Asshole script called console.clear()")}
hoping I get a glimpse of what exactly is calling it.In Firefox, when a console is cleared, it's not just the display that's cleared. The entire console object is reset. This means that any modifications made to the console object, such as redefining console.clear(), are lost when console.clear() is called.
You can try this on this demo [1] website that uses devtools-detector library [2]