[MIRROR] Better Chat Squashing (#5193)

* Merge pull request #35058 from uraniummeltdown/chatsquash

Better Chat Squashing

* Better Chat Squashing
This commit is contained in:
CitadelStationBot
2018-01-30 07:23:18 -06:00
committed by Poojawa
parent 89fa4b0f28
commit 670bc6a929
2 changed files with 19 additions and 8 deletions
@@ -43,12 +43,17 @@ img.icon {
content: 'x';
}
.r {
display: inline;
padding: .2em .6em .3em;
font-size: 75%;
font-weight: 700;
line-height: 1;
color: #f00;
display: inline-block;
min-width: 0.5em;
font-size: 0.7em;
padding: 0.2em 0.3em;
line-height: 1;
color: white;
text-align: center;
white-space: nowrap;
vertical-align: middle;
background-color: crimson;
border-radius: 10px;
}
a {color: #0000ff;}
@@ -312,8 +312,14 @@ function output(message, flag) {
{
lastmessages.append($('<span/>', { 'class': 'r', 'text': 2}));
}
if(parseInt(lastmessages.css("font-size")) < 24) //Completely arbitrary max size
lastmessages.css("font-size","+=2")
var insertedBadge = $(lastmessages).find('.r');
insertedBadge.animate({
"font-size": "0.9em"
}, 100, function() {
insertedBadge.animate({
"font-size": "0.7em"
}, 100);
});
opts.messageCount--;
handled = true;
}