Add CSS for message modifiers [untested]

This commit is contained in:
calzoneman 2013-03-05 12:43:50 -06:00
parent 1e1e51a4ca
commit ab6fc96517
2 changed files with 21 additions and 1 deletions

View file

@ -73,3 +73,21 @@
.userlist_op {
color: #00cc00;
}
.action {
text-decoration: italic;
color: #bbbbbb;
}
.spoiler {
color: #000000;
background-color: #000000;
}
.spoiler:hover {
color: #ffffff;
}
.greentext {
color: #99ff99;
}

View file

@ -45,7 +45,9 @@ function initCallbacks() {
var div = document.createElement('div');
var span = document.createElement('span');
$(span).addClass(data.msgclass);
span.innerHTML = "<strong>&lt;" + data.username + "&gt;</strong> " + data.msg;
if(data.msgclass != "action")
data.msg = "<strong>&lt;" + data.username + "&gt;</strong> " + data.msg;
span.innerHTML = data.msg;
div.appendChild(span);
$('#messagebuffer')[0].appendChild(div);
// Cap chatbox at most recent 100 messages