Skip to content

Commit

Permalink
Update auto.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Dounford-Felipe committed Dec 3, 2023
1 parent c510870 commit bd218d8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion auto.js
Original file line number Diff line number Diff line change
Expand Up @@ -2327,13 +2327,16 @@ window.sendChat = chatSend

const showMessage = (msg, sender) => {
if (msg.startsWith('https') || msg.startsWith('www')) {msg = '<a href='+msg+' target="_blank">'+msg+'</a>'}
if (msg.includes('@'+username)) {ding.play()}
var messageContainer = document.createElement('div');
var senderElement = document.createElement('strong');
senderElement.innerText = sender + ": ";
messageContainer.appendChild(senderElement);
var message = document.createElement('span');
message.innerHTML = msg;
if (msg.includes('@'+username)) {
message.style.backgroundColor = 'gold';
ding.play()
};
messageContainer.style.wordWrap = "break-word";
messageContainer.appendChild(message);
var messageArea = document.getElementById('messages');
Expand Down

0 comments on commit bd218d8

Please sign in to comment.