This commit is contained in:
Mirco Wittrien 2020-08-28 16:05:49 +02:00
parent dc6720db9f
commit 048a2355c3
4 changed files with 24 additions and 11 deletions

View File

@ -1307,6 +1307,7 @@
Channels: "guildchannels", Channels: "guildchannels",
ChannelTextAreaForm: "chatform", ChannelTextAreaForm: "chatform",
ChannelWindow: "chatcontent", ChannelWindow: "chatcontent",
CustomStatusModal: "emojiinputmodal",
DirectMessage: "guildouter", DirectMessage: "guildouter",
Guild: "guildouter", Guild: "guildouter",
GuildFolder: "guildfolderwrapper", GuildFolder: "guildfolderwrapper",
@ -4340,6 +4341,7 @@
charCounter: "charCounter-7fw40k", charCounter: "charCounter-7fw40k",
chatCounter: "chatCounter-XOMPsh", chatCounter: "chatCounter-XOMPsh",
counterAdded: "charCounterAdded-zz9O4t", counterAdded: "charCounterAdded-zz9O4t",
customStatusCounter: "customStatusCounter-G8FrsT",
editCounter: "editCounter-pNT1Xe", editCounter: "editCounter-pNT1Xe",
nickCounter: "nickCounter-tJrO_4", nickCounter: "nickCounter-tJrO_4",
popoutNoteCounter: "popoutNoteCounter-62U4Rh", popoutNoteCounter: "popoutNoteCounter-62U4Rh",
@ -4747,6 +4749,7 @@
_charcountercounter: ["CharCounter", "charCounter"], _charcountercounter: ["CharCounter", "charCounter"],
_charcounterchatcounter: ["CharCounter", "chatCounter"], _charcounterchatcounter: ["CharCounter", "chatCounter"],
_charcountercounteradded: ["CharCounter", "counterAdded"], _charcountercounteradded: ["CharCounter", "counterAdded"],
_charcountercustomstatuscounter: ["CharCounter", "customStatusCounter"],
_charcountereditcounter: ["CharCounter", "editCounter"], _charcountereditcounter: ["CharCounter", "editCounter"],
_charcounternickcounter: ["CharCounter", "nickCounter"], _charcounternickcounter: ["CharCounter", "nickCounter"],
_charcounterpopoutnotecounter: ["CharCounter", "popoutNoteCounter"], _charcounterpopoutnotecounter: ["CharCounter", "popoutNoteCounter"],
@ -5249,6 +5252,7 @@
emojiinputclearbutton: ["EmojiInput", "clearButton"], emojiinputclearbutton: ["EmojiInput", "clearButton"],
emojiinputclearicon: ["EmojiInput", "clearIcon"], emojiinputclearicon: ["EmojiInput", "clearIcon"],
emojiinputcontainer: ["EmojiInput", "inputContainer"], emojiinputcontainer: ["EmojiInput", "inputContainer"],
emojiinputmodal: ["EmojiInput", "modalRoot"],
emojipickerbutton: ["Reactions", "reactionBtn"], emojipickerbutton: ["Reactions", "reactionBtn"],
emojipicker: ["EmojiPicker", "emojiPicker"], emojipicker: ["EmojiPicker", "emojiPicker"],
emojipickerdiversityemojiitem: ["EmojiPickerDiversitySelector", "diversityEmojiItem"], emojipickerdiversityemojiitem: ["EmojiPickerDiversitySelector", "diversityEmojiItem"],

File diff suppressed because one or more lines are too long

View File

@ -6,6 +6,7 @@ var CharCounter = (_ => {
edit: 2000, edit: 2000,
form: 2000, form: 2000,
nick: 32, nick: 32,
customstatus: 128,
popoutnote: 256, popoutnote: 256,
profilenote: 256 profilenote: 256
}; };
@ -24,11 +25,16 @@ var CharCounter = (_ => {
getDescription () {return "Adds a charcounter in the chat.";} getDescription () {return "Adds a charcounter in the chat.";}
constructor () { constructor () {
this.changelog = {
"added":[["Custom Status","Added counter to custom status input"]]
};
this.patchedModules = { this.patchedModules = {
after: { after: {
ChannelTextAreaContainer: "render", ChannelTextAreaContainer: "render",
Note: "render", Note: "render",
ChangeNickname: "render" ChangeNickname: "render",
CustomStatusModal: "render"
} }
}; };
} }
@ -61,6 +67,10 @@ var CharCounter = (_ => {
right: 0 !important; right: 0 !important;
top: 0 !important; top: 0 !important;
} }
${BDFDB.dotCN._charcountercustomstatuscounter} {
right: 0 !important;
top: -1.5em;
}
${BDFDB.dotCN._charcounterpopoutnotecounter} { ${BDFDB.dotCN._charcounterpopoutnotecounter} {
right: 3px !important; right: 3px !important;
bottom: -8px !important; bottom: -8px !important;
@ -147,6 +157,11 @@ var CharCounter = (_ => {
} }
} }
processCustomStatusModal (e) {
let formItem = BDFDB.ReactUtils.findChild(e.returnvalue, {props: [["className", BDFDB.disCN.emojiinputcontainer]]});
if (formItem) this.injectCounter(formItem, formItem.props.children, "customstatus", BDFDB.dotCN.input);
}
injectCounter (parent, children, type, refClass, parsing) { injectCounter (parent, children, type, refClass, parsing) {
if (!children) return; if (!children) return;
parent.props.className = BDFDB.DOMUtils.formatClassName(parent.props.className, BDFDB.disCN._charcountercounteradded); parent.props.className = BDFDB.DOMUtils.formatClassName(parent.props.className, BDFDB.disCN._charcountercounteradded);

View File

@ -39,19 +39,12 @@ var CustomQuoter = (_ => {
return class CustomQuoter { return class CustomQuoter {
getName () {return "CustomQuoter";} getName () {return "CustomQuoter";}
getVersion () {return "1.1.4";} getVersion () {return "1.1.5";}
getAuthor () {return "DevilBro";} getAuthor () {return "DevilBro";}
getDescription () {return "Let's you customize the output of the native quote feature of Discord.";} getDescription () {return "Let's you customize the output of the native quote feature of Discord.";}
constructor () {
this.changelog = {
"fixed":[["Multi Spaces","No longer removes multi spaces from quotes"]],
"added":[["$rawQuote","Ability to insert the raw text of the quoted message"]]
};
}
initConstructor () { initConstructor () {
_this = this; _this = this;
@ -366,7 +359,8 @@ var CustomQuoter = (_ => {
.replace("$month", settings.forceZeros && month < 10 ? "0" + month : month) .replace("$month", settings.forceZeros && month < 10 ? "0" + month : month)
.replace("$year", timestamp.getFullYear()) .replace("$year", timestamp.getFullYear())
.replace("$quote", quotedLines || "") .replace("$quote", quotedLines || "")
.replace("$rawQuote", unquotedLines.join("\n") || ""); .replace("$rawQuote", unquotedLines.join("\n") || "")
.replace(/\$/g, "$$$$");
} }
addLeadingZeros (timestring) { addLeadingZeros (timestring) {