stuff
This commit is contained in:
parent
01fab2788d
commit
285ba141e6
|
@ -391,6 +391,7 @@
|
|||
"ModalCarousel": {"strings": [".gotoNext", "currentIndex", "gotoPrevThrottled"]},
|
||||
"ModalFooter": {"strings": [".footerSeparator", ".separator", "Direction.HORIZONTAL_REVERSE"]},
|
||||
"NameTag": {"strings": ["invertColor:", "usernameClass", "discriminatorClass"]},
|
||||
"Note": {"strings": [".noteRef", "handleBlur", ".SPACE"]},
|
||||
"NowPlayingHeader": {"strings": ["ACTIVITY_FEED_NOW_PLAYING_HEADER", "partiedMembers"]},
|
||||
"NowPlayingItem": {"strings": [".wrapper", "padded:"]},
|
||||
"PanelButton": {"strings": ["Masks.PANEL_BUTTON"]},
|
||||
|
@ -970,7 +971,6 @@
|
|||
"counterAdded": "charCounterAdded-zz9O4t",
|
||||
"customStatusCounter": "customStatusCounter-G8FrsT",
|
||||
"editCounter": "editCounter-pNT1Xe",
|
||||
"nickCounter": "nickCounter-tJrO_4",
|
||||
"popoutNoteCounter": "popoutNoteCounter-62U4Rh",
|
||||
"profileNoteCounter": "profileNoteCounter-p0fWA_",
|
||||
"threadCreation": "threadCreation-p0fWA_",
|
||||
|
@ -1510,7 +1510,6 @@
|
|||
"_charcountercounteradded": ["CharCounter", "counterAdded"],
|
||||
"_charcountercustomstatuscounter": ["CharCounter", "customStatusCounter"],
|
||||
"_charcountereditcounter": ["CharCounter", "editCounter"],
|
||||
"_charcounternickcounter": ["CharCounter", "nickCounter"],
|
||||
"_charcounterpopoutnotecounter": ["CharCounter", "popoutNoteCounter"],
|
||||
"_charcounterprofilenotecounter": ["CharCounter", "profileNoteCounter"],
|
||||
"_charcounterthreadcreationcounter": ["CharCounter", "threadCreation"],
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* @name CharCounter
|
||||
* @author DevilBro
|
||||
* @authorId 278543574059057154
|
||||
* @version 1.6.1
|
||||
* @version 1.6.2
|
||||
* @description Adds a Character Counter to most Inputs
|
||||
* @invite Jx3TjNS
|
||||
* @donate https://www.paypal.me/MircoWittrien
|
||||
|
@ -57,7 +57,6 @@ module.exports = (_ => {
|
|||
}
|
||||
} : (([Plugin, BDFDB]) => {
|
||||
const maxLengths = {
|
||||
nick: 32,
|
||||
customstatus: 128,
|
||||
popoutnote: 256,
|
||||
profilenote: 256
|
||||
|
@ -72,13 +71,12 @@ module.exports = (_ => {
|
|||
|
||||
return class CharCounter extends Plugin {
|
||||
onLoad () {
|
||||
this.patchedModules = {
|
||||
after: {
|
||||
ChannelTextAreaContainer: "render",
|
||||
Note: "render",
|
||||
NicknameSection: "default",
|
||||
CustomStatusModal: "render"
|
||||
}
|
||||
this.modulePatches = {
|
||||
after: [
|
||||
"ChannelTextAreaContainer",
|
||||
"CustomStatusModal",
|
||||
"Note"
|
||||
]
|
||||
};
|
||||
|
||||
this.defaults = {
|
||||
|
@ -114,10 +112,6 @@ module.exports = (_ => {
|
|||
right: 0;
|
||||
bottom: -1.0em;
|
||||
}
|
||||
${BDFDB.dotCN._charcounternickcounter} {
|
||||
right: 0 !important;
|
||||
top: -1.5em;
|
||||
}
|
||||
${BDFDB.dotCN._charcountercustomstatuscounter} {
|
||||
right: 0 !important;
|
||||
top: -1.5em;
|
||||
|
@ -183,7 +177,8 @@ module.exports = (_ => {
|
|||
}
|
||||
|
||||
processNote (e) {
|
||||
let [children, index] = BDFDB.ReactUtils.findParent(e.returnvalue, {name: ["TextAreaAutosize", "TextArea", "PlainTextArea"]});
|
||||
console.log(e);
|
||||
let [children, index] = BDFDB.ReactUtils.findParent(e.returnvalue, {filter: n => n && n.props && n.props.autoCorrect != undefined});
|
||||
if (index > -1) this.injectCounter(e.returnvalue, children, e.instance.props.className && e.instance.props.className.indexOf(BDFDB.disCN.usernotepopout) > -1 ? "popoutnote" : "profilenote", "textarea");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue