Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Checks if the user is chatbot
- if (userName == 'ChatBot'){
- //Places the chatbot avatar in the variable
- var AvatarPic = '<img src="img/chatbot.png"></img> ';
- }
- else{
- //Places the UNIQUE user avatar in the variable
- //outcome of this will be:
- //<img title="UniqueUserName" alt="UniqueUserName" src="img/userID.png"></img>
- var AvatarPic = '<img title="'
- + userName
- +'" alt="'
- + userName
- + '" src="img/'
- + userID
- +'.png"></img> ';
- }
- //Here is where everything is written to chat
- return '<div id="'
- + this.getMessageDocumentID(messageID)
- + '" class="'
- + rowClass
- + '">'
- + this.getDeletionLink(messageID, userID, userRole, channelID)
- + dateTime
- //This is where the Avatar Line is inserted (just before the AjaxChat username
- + AvatarPic
- + '<span class="'
- + userClass
- + '"'
- + this.getChatListUserNameTitle(userID, userName, userRole, ip)
- + ' dir="'
- + this.baseDirection
- + '" onclick="ajaxChat.insertText(this.firstChild.nodeValue);">'
- + userName
- + '</span>'
- + colon
- + this.replaceText(messageText)
- + '</div>';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement