Update CharCounter.plugin.js

This commit is contained in:
Mirco Wittrien 2021-07-28 21:40:32 +02:00
parent a9a9054548
commit 38511028ab
1 changed files with 8 additions and 2 deletions

View File

@ -2,7 +2,7 @@
* @name CharCounter
* @author DevilBro
* @authorId 278543574059057154
* @version 1.5.5
* @version 1.5.6
* @description Adds a Character Counter to most Inputs
* @invite Jx3TjNS
* @donate https://www.paypal.me/MircoWittrien
@ -17,7 +17,7 @@ module.exports = (_ => {
"info": {
"name": "CharCounter",
"author": "DevilBro",
"version": "1.5.5",
"version": "1.5.6",
"description": "Adds a Character Counter to most Inputs"
},
"changeLog": {
@ -82,6 +82,7 @@ module.exports = (_ => {
const typeMap = {
normal: "chat",
sidebar: "chat",
thread_creation: "threadcreation",
form: "upload"
};
@ -115,6 +116,10 @@ module.exports = (_ => {
right: 0;
bottom: -1.3em;
}
${BDFDB.dotCN._charcounterthreadcreationcounter} {
right: 0;
bottom: -1.1em;
}
${BDFDB.dotCN._charcounteruploadcounter} {
right: 0;
bottom: -1.0em;
@ -153,6 +158,7 @@ module.exports = (_ => {
}
processChannelTextAreaContainer (e) {
console.log(e);
let editorContainer = BDFDB.ReactUtils.findChild(e.returnvalue, {name: "ChannelEditorContainer"});
if (editorContainer && editorContainer.props.type && !editorContainer.props.disabled) {
if (!BDFDB.ArrayUtils.is(e.returnvalue.props.children)) e.returnvalue.props.children = [e.returnvalue.props.children];