var MUTES = localStorage["mutes"] ? JSON.parse(localStorage["mutes"]) : {}
$(".mute").live("click", function(){
$(this).removeClass("mute");
$(this).addClass("unmute");
$(this).html("o");
var nick = $(this).parent().children("a").html().replace(/]+>/,"");
$(".nick_" + nick).hide();
MUTES[nick] = true
localStorage['mutes'] = JSON.stringify(MUTES)
});
$(".unmute").live("click", function(){
$(this).removeClass("unmute");
$(this).addClass("mute");
$(this).html("x");
var nick = $(this).parent().children("a").html().replace(/
]+>/,"");
$(".nick_" + nick).show();
delete MUTES[nick];
localStorage['mutes'] = JSON.stringify(MUTES)
});
function buildUserDiv(user) {
var muted = MUTES[user.nick] ? 'o' : 'x';
if (user.avatar) {
return '
'
+ escapeHtml(user.nick)
+ ''
+ '