When Multiple Groups Chats are open chatHistory node sometimes does not appear under DropTarget chatHistoryAndMembers, causing the code the look for chatHistory using the wrong index number.
var chatHistory = document.getElementsByClassName("chatHistory")[activeTabIndex].childNodes;
new code. look for the active DropTarget chatHistoryAndMembers, find the chatHistory under it
var activeChatBody = document.getElementsByClassName("DropTarget chatWindow MultiUserChat")[activeTabIndex];
var chatHistory = activeChatBody.getElementsByClassName("chatHistory")[0].childNodes;
When Multiple Groups Chats are open chatHistory node sometimes does not appear under DropTarget chatHistoryAndMembers, causing the code the look for chatHistory using the wrong index number.
current code L24
new code. look for the active DropTarget chatHistoryAndMembers, find the chatHistory under it