SimpleChat: Disable console debug by default by making it dummy
Parallely save a reference to the original func.
This commit is contained in:
parent
07923745cf
commit
fcd385c36a
1 changed files with 11 additions and 0 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue