plugins
This commit is contained in:
parent
6ab5abb925
commit
43a27d43f4
|
@ -395,7 +395,7 @@ module.exports = (_ => {
|
||||||
BDFDB.ReactUtils.forceUpdate(e.instance);
|
BDFDB.ReactUtils.forceUpdate(e.instance);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}}, {force: true, noCache: true});
|
}}, {noCache: true});
|
||||||
}
|
}
|
||||||
|
|
||||||
processMessageEditor (e) {
|
processMessageEditor (e) {
|
||||||
|
@ -412,7 +412,7 @@ module.exports = (_ => {
|
||||||
}
|
}
|
||||||
BDFDB.ReactUtils.forceUpdate(e.instance);
|
BDFDB.ReactUtils.forceUpdate(e.instance);
|
||||||
}
|
}
|
||||||
}}, {force: true, noCache: true});
|
}}, {noCache: true});
|
||||||
}
|
}
|
||||||
|
|
||||||
formatText (text) {
|
formatText (text) {
|
||||||
|
|
|
@ -1072,7 +1072,7 @@ module.exports = (_ => {
|
||||||
}
|
}
|
||||||
let avatar = BDFDB.ReactUtils.findChild(e2.returnValue, {props: [["className", BDFDB.disCN.auditlogpopoutavatar]]});
|
let avatar = BDFDB.ReactUtils.findChild(e2.returnValue, {props: [["className", BDFDB.disCN.auditlogpopoutavatar]]});
|
||||||
if (avatar) avatar.props.src = this.getUserAvatar(e2.methodArguments[0].user.id);
|
if (avatar) avatar.props.src = this.getUserAvatar(e2.methodArguments[0].user.id);
|
||||||
}}}, {force: true, noCache: true});
|
}}}, {noCache: true});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -414,7 +414,7 @@ module.exports = (_ => {
|
||||||
].filter(n => n);
|
].filter(n => n);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}}, {force: true, noCache: true});
|
}}, {noCache: true});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -80,7 +80,7 @@ module.exports = (_ => {
|
||||||
let parent = BDFDB.DOMUtils.getParent(e2.methodArguments[0].shiftKey ? BDFDB.dotCN.messageswrapper : BDFDB.dotCN.message, e2.methodArguments[0].target) || e2.methodArguments[0].target.parentElement;
|
let parent = BDFDB.DOMUtils.getParent(e2.methodArguments[0].shiftKey ? BDFDB.dotCN.messageswrapper : BDFDB.dotCN.message, e2.methodArguments[0].target) || e2.methodArguments[0].target.parentElement;
|
||||||
if (parent) for (let spoiler of parent.querySelectorAll(BDFDB.dotCN.spoilerhidden)) if (!BDFDB.DOMUtils.getParent(BDFDB.dotCN.messagerepliedmessagepreview, spoiler)) spoiler.click();
|
if (parent) for (let spoiler of parent.querySelectorAll(BDFDB.dotCN.spoilerhidden)) if (!BDFDB.DOMUtils.getParent(BDFDB.dotCN.messagerepliedmessagepreview, spoiler)) spoiler.click();
|
||||||
}
|
}
|
||||||
}}, {force: true, noCache: true});
|
}}, {noCache: true});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
})(window.BDFDB_Global.PluginUtils.buildPlugin(changeLog));
|
})(window.BDFDB_Global.PluginUtils.buildPlugin(changeLog));
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* @name SplitLargeMessages
|
* @name SplitLargeMessages
|
||||||
* @author DevilBro
|
* @author DevilBro
|
||||||
* @authorId 278543574059057154
|
* @authorId 278543574059057154
|
||||||
* @version 1.7.8
|
* @version 1.7.9
|
||||||
* @description Allows you to enter larger Messages, which will automatically split into several smaller Messages
|
* @description Allows you to enter larger Messages, which will automatically split into several smaller Messages
|
||||||
* @invite Jx3TjNS
|
* @invite Jx3TjNS
|
||||||
* @donate https://www.paypal.me/MircoWittrien
|
* @donate https://www.paypal.me/MircoWittrien
|
||||||
|
@ -130,7 +130,6 @@ module.exports = (_ => {
|
||||||
if (e.instance.props.type != BDFDB.DiscordConstants.ChannelTextAreaTypes.NORMAL && e.instance.props.type != BDFDB.DiscordConstants.ChannelTextAreaTypes.NORMAL_WITH_ACTIVITY && e.instance.props.type != BDFDB.LibraryComponents.ChannelTextAreaTypes.SIDEBAR) return;
|
if (e.instance.props.type != BDFDB.DiscordConstants.ChannelTextAreaTypes.NORMAL && e.instance.props.type != BDFDB.DiscordConstants.ChannelTextAreaTypes.NORMAL_WITH_ACTIVITY && e.instance.props.type != BDFDB.LibraryComponents.ChannelTextAreaTypes.SIDEBAR) return;
|
||||||
if (!e.returnvalue) {
|
if (!e.returnvalue) {
|
||||||
BDFDB.PatchUtils.patch(this, e.instance.props, "onSubmit", {instead: e2 => {
|
BDFDB.PatchUtils.patch(this, e.instance.props, "onSubmit", {instead: e2 => {
|
||||||
console.log(e2);
|
|
||||||
if (e2.methodArguments[0].value.length > maxMessageLength && !this.isSlowDowned(e.instance.props.channel)) {
|
if (e2.methodArguments[0].value.length > maxMessageLength && !this.isSlowDowned(e.instance.props.channel)) {
|
||||||
e2.stopOriginalMethodCall();
|
e2.stopOriginalMethodCall();
|
||||||
let messages = this.formatText(e2.methodArguments[0].value).filter(n => n);
|
let messages = this.formatText(e2.methodArguments[0].value).filter(n => n);
|
||||||
|
@ -145,7 +144,7 @@ module.exports = (_ => {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else return e2.callOriginalMethodAfterwards();
|
else return e2.callOriginalMethodAfterwards();
|
||||||
}});
|
}}, {noCache: true});
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
let [children, index] = BDFDB.ReactUtils.findParent(e.returnvalue, {name: "ChannelTextAreaCounter"});
|
let [children, index] = BDFDB.ReactUtils.findParent(e.returnvalue, {name: "ChannelTextAreaCounter"});
|
||||||
|
|
|
@ -667,7 +667,7 @@ module.exports = (_ => {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return e2.callOriginalMethodAfterwards();
|
return e2.callOriginalMethodAfterwards();
|
||||||
}}, {force: true, noCache: true});
|
}}, {noCache: true});
|
||||||
}
|
}
|
||||||
|
|
||||||
processChannelTextAreaEditor (e) {
|
processChannelTextAreaEditor (e) {
|
||||||
|
|
Loading…
Reference in New Issue