SimpleChat: Disable console debug by default by making it dummy

Parallely save a reference to the original func.
This commit is contained in:
HanishKVC 2024-05-28 23:16:18 +05:30
parent 07923745cf
commit fcd385c36a

View file

@ -672,6 +672,16 @@ class Me {
};
}
/**
* Disable console.debug by mapping it to a empty function.
*/
debug_disable() {
this.console_debug = console.debug;
console.debug = () => {
};
}
/**
* Show the configurable parameters info in the passed Div element.
* @param {HTMLDivElement} elDiv
@ -744,6 +754,7 @@ let gMe;
function startme() {
console.log("INFO:SimpleChat:StartMe:Starting...");
gMe = new Me();
gMe.debug_disable();
document["gMe"] = gMe;
document["du"] = du;
for (let cid of gMe.defaultChatIds) {