From c1ef0848cdc49f79427521bc53433470ba183ee9 Mon Sep 17 00:00:00 2001 From: Calvin Montgomery Date: Wed, 7 Jan 2015 15:58:36 -0500 Subject: [PATCH] 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. --- www/js/util.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/www/js/util.js b/www/js/util.js index aadb8e83..450cb9b1 100644 --- a/www/js/util.js +++ b/www/js/util.js @@ -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)