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