Skip to content

Commit

Permalink
Changed message box pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
Nelson Galdeman committed Mar 23, 2018
1 parent 29804f6 commit 728eda9
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions bot.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@
}
ignoreLastMsg[title] = message;

messageBox = document.querySelectorAll("[spellcheck='true']")[0];
messageBox = document.querySelectorAll("[contenteditable='true']")[0];

//add text into input field
messageBox.innerHTML = message.replace(/ /gm,'');
Expand Down Expand Up @@ -261,7 +261,12 @@
console.log(new Date(), 'new message to process, uhull -> ', title, lastMsg);

// select chat and send message
if (!processLastMsgOnChat){
var send = { sendMessage(!processLastMsgOnChat ? chat : null, sendText.trim(), () => {
goAgain(() => { start(chats, cnt + 1) }, 0.1);
});
};
selectChat(chat, send);
/*if (!processLastMsgOnChat){
selectChat(chat, () => {
sendMessage(chat, sendText.trim(), () => {
goAgain(() => { start(chats, cnt + 1) }, 0.1);
Expand All @@ -271,7 +276,7 @@
sendMessage(null, sendText.trim(), () => {
goAgain(() => { start(chats, cnt + 1) }, 0.1);
});
}
}*/
}
start();
})()

0 comments on commit 728eda9

Please sign in to comment.