Update SendLargeMessages.plugin.js

This commit is contained in:
Mirco Wittrien 2018-12-08 10:19:02 +01:00
parent 0fe60032a1
commit e814f20a54
1 changed files with 6 additions and 3 deletions

View File

@ -63,7 +63,7 @@ class SendLargeMessages {
getDescription () {return "Opens a popout when your message is too large, which allows you to automatically send the message in several smaller messages.";}
getVersion () {return "1.4.8";}
getVersion () {return "1.4.9";}
getAuthor () {return "DevilBro";}
@ -249,8 +249,11 @@ class SendLargeMessages {
sendMessage (text) {
var textarea = document.querySelector(BDFDB.dotCNS.textareawrapchat + "textarea");
if (textarea) {
BDFDB.getOwnerInstance({"node":textarea, "name":"ChannelTextAreaForm", "up":true}).setState({textValue:text});
BDFDB.triggerSend(textarea);
var instance = BDFDB.getOwnerInstance({"node":textarea.parentElement, "name":"ChannelTextAreaForm", "up":true});
if (instance) {
instance.setState({textValue:text});
BDFDB.triggerSend(textarea);
}
}
}