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

File diff suppressed because one or more lines are too long

View File

@ -6,6 +6,7 @@ var CharCounter = (_ => {
edit: 2000,
form: 2000,
nick: 32,
customstatus: 128,
popoutnote: 256,
profilenote: 256
};
@ -24,11 +25,16 @@ var CharCounter = (_ => {
getDescription () {return "Adds a charcounter in the chat.";}
constructor () {
this.changelog = {
"added":[["Custom Status","Added counter to custom status input"]]
};
this.patchedModules = {
after: {
ChannelTextAreaContainer: "render",
Note: "render",
ChangeNickname: "render"
ChangeNickname: "render",
CustomStatusModal: "render"
}
};
}
@ -61,6 +67,10 @@ var CharCounter = (_ => {
right: 0 !important;
top: 0 !important;
}
${BDFDB.dotCN._charcountercustomstatuscounter} {
right: 0 !important;
top: -1.5em;
}
${BDFDB.dotCN._charcounterpopoutnotecounter} {
right: 3px !important;
bottom: -8px !important;
@ -146,6 +156,11 @@ var CharCounter = (_ => {
if (index > -1) this.injectCounter(formItem, children, "nick", BDFDB.dotCN.input);
}
}
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) {
if (!children) return;

View File

@ -39,18 +39,11 @@ var CustomQuoter = (_ => {
return class CustomQuoter {
getName () {return "CustomQuoter";}
getVersion () {return "1.1.4";}
getVersion () {return "1.1.5";}
getAuthor () {return "DevilBro";}
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 () {
_this = this;
@ -366,7 +359,8 @@ var CustomQuoter = (_ => {
.replace("$month", settings.forceZeros && month < 10 ? "0" + month : month)
.replace("$year", timestamp.getFullYear())
.replace("$quote", quotedLines || "")
.replace("$rawQuote", unquotedLines.join("\n") || "");
.replace("$rawQuote", unquotedLines.join("\n") || "")
.replace(/\$/g, "$$$$");
}
addLeadingZeros (timestring) {