diff --git a/Library/_res/0BDFDB.data.json b/Library/_res/0BDFDB.data.json index df46da1e5c..02a51efcbb 100644 --- a/Library/_res/0BDFDB.data.json +++ b/Library/_res/0BDFDB.data.json @@ -395,6 +395,7 @@ "PrivateChannel": {"strings": ["LEAVE_GROUP_DM_MANAGED_BODY", "handleCloseButtonMouseDown", "handleLeaveGroup"]}, "PrivateChannelRecipients": {"strings": [".membersWrap", "recipients"]}, "PrivateChannelsList": {"strings": ["privateChannelIds", "privateChannelRecipientsInviteButtonIcon"]}, + "QuickMessage": {"strings": ["QUICK_DM_USER", ".NORMAL"]}, "Reactions": {"strings": ["disableTransitionAppear", "reactionsCount:", "message.reactions.length"]}, "Reactor": {"strings": ["currentUser cannot be undefined", "reactorDefault"]}, "ReactorsComponent": {"strings": ["hasMore", "emoji", "spinnerMore"]}, diff --git a/Plugins/WriteUpperCase/WriteUpperCase.plugin.js b/Plugins/WriteUpperCase/WriteUpperCase.plugin.js index d054313874..d29a851b98 100644 --- a/Plugins/WriteUpperCase/WriteUpperCase.plugin.js +++ b/Plugins/WriteUpperCase/WriteUpperCase.plugin.js @@ -2,7 +2,7 @@ * @name WriteUpperCase * @author DevilBro * @authorId 278543574059057154 - * @version 1.3.6 + * @version 1.3.7 * @description Changes the first Letter of each Sentence in Message Inputs to Uppercase * @invite Jx3TjNS * @donate https://www.paypal.me/MircoWittrien @@ -16,7 +16,7 @@ module.exports = (_ => { const changeLog = { }; - + return !window.BDFDB_Global || (!window.BDFDB_Global.loaded && !window.BDFDB_Global.started) ? class { constructor (meta) {for (let key in meta) this[key] = meta[key];} getName () {return this.name;} @@ -96,14 +96,14 @@ module.exports = (_ => { } }; - this.patchedModules = { - before: { - ChannelEditorContainer: "render" - }, - after: { - ChannelTextAreaButtons: "type", - QuickMessage: "default" - } + this.modulePatches = { + before: [ + "ChannelTextAreaEditor" + ], + after: [ + "ChannelTextAreaButtons", + "QuickMessage" + ] }; this.css = ` @@ -158,14 +158,10 @@ module.exports = (_ => { BDFDB.PatchUtils.forceAllUpdates(this); } } - - forceUpdateAll () { - BDFDB.PatchUtils.forceAllUpdates(this); - } - processChannelEditorContainer (e) { + processChannelTextAreaEditor (e) { let type = e.instance.props.type.analyticsName || e.instance.props.type || ""; - if (e.instance.props.textValue && e.instance.state.focused && (!type || this.settings.places[type] || !this.defaults.places[type]) && (!this.settings.general.addQuickToggle || channelBlacklist.indexOf(e.instance.props.channel.id) == -1)) { + if (e.instance.props.textValue && e.instance.props.focused && (!type || this.settings.places[type] || !this.defaults.places[type]) && (!this.settings.general.addQuickToggle || channelBlacklist.indexOf(e.instance.props.channel.id) == -1)) { let string = e.instance.props.textValue; let newString = this.parse(string); if (string != newString) {