Update SendLargeMessages.plugin.js
This commit is contained in:
parent
c25b0d7565
commit
17c5f405c0
|
@ -3,13 +3,16 @@
|
||||||
class SendLargeMessages {
|
class SendLargeMessages {
|
||||||
getName () {return "SendLargeMessages";}
|
getName () {return "SendLargeMessages";}
|
||||||
|
|
||||||
getVersion () {return "1.5.2";}
|
getVersion () {return "1.5.3";}
|
||||||
|
|
||||||
getAuthor () {return "DevilBro";}
|
getAuthor () {return "DevilBro";}
|
||||||
|
|
||||||
getDescription () {return "Opens a popout when your message is too large, which allows you to automatically send the message in several smaller messages.";}
|
getDescription () {return "Opens a popout when your message is too large, which allows you to automatically send the message in several smaller messages.";}
|
||||||
|
|
||||||
initConstructor () {
|
initConstructor () {
|
||||||
|
this.changelog = {
|
||||||
|
"fixed":[["Sending","Fixed the issue where Messages are not being sent"]]
|
||||||
|
};
|
||||||
this.labels = {};
|
this.labels = {};
|
||||||
|
|
||||||
this.patchModules = {
|
this.patchModules = {
|
||||||
|
@ -167,7 +170,6 @@ class SendLargeMessages {
|
||||||
BDFDB.appendModal(sendMessageModal);
|
BDFDB.appendModal(sendMessageModal);
|
||||||
|
|
||||||
BDFDB.addChildEventListener(sendMessageModal, "click", ".btn-send", e => {
|
BDFDB.addChildEventListener(sendMessageModal, "click", ".btn-send", e => {
|
||||||
e.preventDefault();
|
|
||||||
let messages = this.formatText(textinput.value || "");
|
let messages = this.formatText(textinput.value || "");
|
||||||
messages.forEach((message,i) => {
|
messages.forEach((message,i) => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
@ -245,7 +247,7 @@ class SendLargeMessages {
|
||||||
sendMessage (text) {
|
sendMessage (text) {
|
||||||
let textarea = document.querySelector(BDFDB.dotCNS.textareawrapchat + "textarea");
|
let textarea = document.querySelector(BDFDB.dotCNS.textareawrapchat + "textarea");
|
||||||
if (textarea) {
|
if (textarea) {
|
||||||
let instance = BDFDB.getOwnerInstance({"node":textarea.parentElement, "name":"ChannelTextAreaForm", "up":true});
|
let instance = BDFDB.getOwnerInstance({"node":BDFDB.getParentEle(BDFDB.dotCNS.chat + "form", textarea), "name":"ChannelTextAreaForm", "up":true});
|
||||||
if (instance) {
|
if (instance) {
|
||||||
instance.setState({textValue:text});
|
instance.setState({textValue:text});
|
||||||
BDFDB.triggerSend(textarea);
|
BDFDB.triggerSend(textarea);
|
||||||
|
|
Loading…
Reference in New Issue