This commit is contained in:
Mirco Wittrien 2020-01-21 19:21:27 +01:00
parent 89205369e3
commit 79b781b267
3 changed files with 9 additions and 7 deletions

View File

@ -6895,7 +6895,7 @@
};
BDFDB.ListenerUtils.multiRemove(this.refElement, "mousedown", this._handleSelection);
BDFDB.ListenerUtils.multiAdd(this.refElement, "mousedown", this._handleSelection);
if (this.refElement.tagName == "input" || this.refElement.tagName == "textarea") {
if (this.refElement.tagName == "INPUT" || this.refElement.tagName == "TEXTAREA") {
BDFDB.ListenerUtils.multiRemove(this.refElement, "keydown click change", this._updateCounter);
BDFDB.ListenerUtils.multiAdd(this.refElement, "keydown click change", this._updateCounter);
}
@ -6914,10 +6914,12 @@
}
else BDFDB.LogUtils.warn("refClass can not be undefined for BDFDB_CharCounter");
}
render() {;
render() {
let string = this.getCounterString();
BDFDB.TimeUtils.timeout(_ => {if (string != this.getCounterString()) BDFDB.ReactUtils.forceUpdate(this);});
return BDFDB.ReactUtils.createElement("div", BDFDB.ObjectUtils.exclude(Object.assign({}, this.props, {
className: BDFDB.DOMUtils.formatClassName(BDFDB.disCN.charcounter, this.props.className),
children: this.getCounterString()
children: string
}), "parsing", "max", "refClass", "renderPrefix", "renderSuffix"));
}
};

File diff suppressed because one or more lines are too long

View File

@ -3,7 +3,7 @@
class ChatFilter {
getName () {return "ChatFilter";}
getVersion () {return "3.3.6";}
getVersion () {return "3.3.7";}
getAuthor () {return "DevilBro";}
@ -281,9 +281,9 @@ class ChatFilter {
let settings = BDFDB.DataUtils.get(this, "settings");
let replaces = BDFDB.DataUtils.get(this, "replaces");
let blocked = false;
let blocked = false, blockedReplace;
for (let bWord in this.words.blocked) {
let blockedReplace = this.words.blocked[bWord].empty ? "" : (this.words.blocked[bWord].replace || replaces.blocked);
blockedReplace = this.words.blocked[bWord].empty ? "" : (this.words.blocked[bWord].replace || replaces.blocked);
let reg = this.createReg(bWord, this.words.blocked[bWord]);
strings.forEach(string => {
if (this.testForEmoji(string, reg)) blocked = true;