stuff
This commit is contained in:
parent
01fab2788d
commit
285ba141e6
|
@ -391,6 +391,7 @@
|
||||||
"ModalCarousel": {"strings": [".gotoNext", "currentIndex", "gotoPrevThrottled"]},
|
"ModalCarousel": {"strings": [".gotoNext", "currentIndex", "gotoPrevThrottled"]},
|
||||||
"ModalFooter": {"strings": [".footerSeparator", ".separator", "Direction.HORIZONTAL_REVERSE"]},
|
"ModalFooter": {"strings": [".footerSeparator", ".separator", "Direction.HORIZONTAL_REVERSE"]},
|
||||||
"NameTag": {"strings": ["invertColor:", "usernameClass", "discriminatorClass"]},
|
"NameTag": {"strings": ["invertColor:", "usernameClass", "discriminatorClass"]},
|
||||||
|
"Note": {"strings": [".noteRef", "handleBlur", ".SPACE"]},
|
||||||
"NowPlayingHeader": {"strings": ["ACTIVITY_FEED_NOW_PLAYING_HEADER", "partiedMembers"]},
|
"NowPlayingHeader": {"strings": ["ACTIVITY_FEED_NOW_PLAYING_HEADER", "partiedMembers"]},
|
||||||
"NowPlayingItem": {"strings": [".wrapper", "padded:"]},
|
"NowPlayingItem": {"strings": [".wrapper", "padded:"]},
|
||||||
"PanelButton": {"strings": ["Masks.PANEL_BUTTON"]},
|
"PanelButton": {"strings": ["Masks.PANEL_BUTTON"]},
|
||||||
|
@ -970,7 +971,6 @@
|
||||||
"counterAdded": "charCounterAdded-zz9O4t",
|
"counterAdded": "charCounterAdded-zz9O4t",
|
||||||
"customStatusCounter": "customStatusCounter-G8FrsT",
|
"customStatusCounter": "customStatusCounter-G8FrsT",
|
||||||
"editCounter": "editCounter-pNT1Xe",
|
"editCounter": "editCounter-pNT1Xe",
|
||||||
"nickCounter": "nickCounter-tJrO_4",
|
|
||||||
"popoutNoteCounter": "popoutNoteCounter-62U4Rh",
|
"popoutNoteCounter": "popoutNoteCounter-62U4Rh",
|
||||||
"profileNoteCounter": "profileNoteCounter-p0fWA_",
|
"profileNoteCounter": "profileNoteCounter-p0fWA_",
|
||||||
"threadCreation": "threadCreation-p0fWA_",
|
"threadCreation": "threadCreation-p0fWA_",
|
||||||
|
@ -1510,7 +1510,6 @@
|
||||||
"_charcountercounteradded": ["CharCounter", "counterAdded"],
|
"_charcountercounteradded": ["CharCounter", "counterAdded"],
|
||||||
"_charcountercustomstatuscounter": ["CharCounter", "customStatusCounter"],
|
"_charcountercustomstatuscounter": ["CharCounter", "customStatusCounter"],
|
||||||
"_charcountereditcounter": ["CharCounter", "editCounter"],
|
"_charcountereditcounter": ["CharCounter", "editCounter"],
|
||||||
"_charcounternickcounter": ["CharCounter", "nickCounter"],
|
|
||||||
"_charcounterpopoutnotecounter": ["CharCounter", "popoutNoteCounter"],
|
"_charcounterpopoutnotecounter": ["CharCounter", "popoutNoteCounter"],
|
||||||
"_charcounterprofilenotecounter": ["CharCounter", "profileNoteCounter"],
|
"_charcounterprofilenotecounter": ["CharCounter", "profileNoteCounter"],
|
||||||
"_charcounterthreadcreationcounter": ["CharCounter", "threadCreation"],
|
"_charcounterthreadcreationcounter": ["CharCounter", "threadCreation"],
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* @name CharCounter
|
* @name CharCounter
|
||||||
* @author DevilBro
|
* @author DevilBro
|
||||||
* @authorId 278543574059057154
|
* @authorId 278543574059057154
|
||||||
* @version 1.6.1
|
* @version 1.6.2
|
||||||
* @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
|
||||||
|
@ -57,7 +57,6 @@ module.exports = (_ => {
|
||||||
}
|
}
|
||||||
} : (([Plugin, BDFDB]) => {
|
} : (([Plugin, BDFDB]) => {
|
||||||
const maxLengths = {
|
const maxLengths = {
|
||||||
nick: 32,
|
|
||||||
customstatus: 128,
|
customstatus: 128,
|
||||||
popoutnote: 256,
|
popoutnote: 256,
|
||||||
profilenote: 256
|
profilenote: 256
|
||||||
|
@ -72,13 +71,12 @@ module.exports = (_ => {
|
||||||
|
|
||||||
return class CharCounter extends Plugin {
|
return class CharCounter extends Plugin {
|
||||||
onLoad () {
|
onLoad () {
|
||||||
this.patchedModules = {
|
this.modulePatches = {
|
||||||
after: {
|
after: [
|
||||||
ChannelTextAreaContainer: "render",
|
"ChannelTextAreaContainer",
|
||||||
Note: "render",
|
"CustomStatusModal",
|
||||||
NicknameSection: "default",
|
"Note"
|
||||||
CustomStatusModal: "render"
|
]
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
this.defaults = {
|
this.defaults = {
|
||||||
|
@ -114,10 +112,6 @@ module.exports = (_ => {
|
||||||
right: 0;
|
right: 0;
|
||||||
bottom: -1.0em;
|
bottom: -1.0em;
|
||||||
}
|
}
|
||||||
${BDFDB.dotCN._charcounternickcounter} {
|
|
||||||
right: 0 !important;
|
|
||||||
top: -1.5em;
|
|
||||||
}
|
|
||||||
${BDFDB.dotCN._charcountercustomstatuscounter} {
|
${BDFDB.dotCN._charcountercustomstatuscounter} {
|
||||||
right: 0 !important;
|
right: 0 !important;
|
||||||
top: -1.5em;
|
top: -1.5em;
|
||||||
|
@ -183,7 +177,8 @@ module.exports = (_ => {
|
||||||
}
|
}
|
||||||
|
|
||||||
processNote (e) {
|
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");
|
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