Add CSS classes for muted users (#426)

- If a user is muted, the `userlist_muted` class is added to the
  corresponding `.userlist_item`.
- If the user is shadowmuted, the `userlist_smuted` and `userlist_muted`
  classes are added.
- If the user is AFK, the `userlist_afk` class is added.
This commit is contained in:
Calvin Montgomery 2015-01-07 15:58:36 -05:00
parent b56809138c
commit c1ef0848cd
1 changed files with 18 additions and 0 deletions

View File

@ -86,6 +86,24 @@ function formatUserlistItem(div) {
name.addClass(getNameColor(data.rank));
div.find(".profile-box").remove();
if (data.afk) {
div.addClass("userlist_afk");
} else {
div.removeClass("userlist_afk");
}
if (div.data("meta") && div.data("meta").muted) {
div.addClass("userlist_muted");
} else {
div.removeClass("userlist_muted");
}
if (div.data("meta") && div.data("meta").smuted) {
div.addClass("userlist_smuted");
} else {
div.removeClass("userlist_smuted");
}
var profile = null;
name.mouseenter(function(ev) {
if (profile)