Update 0BDFDB.plugin.js
This commit is contained in:
parent
fedd098af4
commit
9881e5b42f
|
@ -2,7 +2,7 @@
|
|||
* @name BDFDB
|
||||
* @author DevilBro
|
||||
* @authorId 278543574059057154
|
||||
* @version 2.0.1
|
||||
* @version 2.0.
|
||||
* @description Required Library for DevilBro's Plugins
|
||||
* @invite Jx3TjNS
|
||||
* @donate https://www.paypal.me/MircoWittrien
|
||||
|
@ -19,7 +19,7 @@ module.exports = (_ => {
|
|||
"info": {
|
||||
"name": "BDFDB",
|
||||
"author": "DevilBro",
|
||||
"version": "2.0.1",
|
||||
"version": "2.0.2",
|
||||
"description": "Required Library for DevilBro's Plugins"
|
||||
},
|
||||
"rawUrl": `https://mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js`
|
||||
|
@ -4997,7 +4997,7 @@ module.exports = (_ => {
|
|||
else string = input.value || input.textContent || "";
|
||||
}
|
||||
else string = input.value || input.textContent || "";
|
||||
if (this.props.max && this.props.showPercentage && (string.length/this.props.max) * 100 < this.props.showPercentage) return null;
|
||||
if (this.props.max && this.props.showPercentage && (string.length/this.props.max) * 100 < this.props.showPercentage) return "";
|
||||
let start = input.selectionStart || 0, end = input.selectionEnd || 0, selectlength = end - start, selection = BDFDB.DOMUtils.getSelection();
|
||||
let select = !selectlength && !selection ? 0 : (selectlength || selection.length);
|
||||
select = !select ? 0 : (select > string.length ? (end || start ? string.length - (string.length - end - start) : string.length) : select);
|
||||
|
@ -5080,7 +5080,6 @@ module.exports = (_ => {
|
|||
}
|
||||
render() {
|
||||
let string = this.getCounterString();
|
||||
if (!string) return null;
|
||||
BDFDB.TimeUtils.timeout(_ => 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),
|
||||
|
|
Loading…
Reference in New Issue