From b04eea907242bb895f9578638f5f05612311fa66 Mon Sep 17 00:00:00 2001 From: dumpfmprod Date: Sat, 28 Jun 2014 12:22:17 -0400 Subject: fix bug where personal mutes didnt affect .oldmsg divs --- static/js/src/userlist.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'static/js/src/userlist.js') diff --git a/static/js/src/userlist.js b/static/js/src/userlist.js index 3ccb9b2..5ed34be 100644 --- a/static/js/src/userlist.js +++ b/static/js/src/userlist.js @@ -1,8 +1,11 @@ -try { - var MUTES = localStorage["mutes"] ? JSON.parse(localStorage["mutes"]) : {}; -} -catch (e) { - delete localStorage["mutes"] +function initMutes(){ + try { + window.MUTES = localStorage["mutes"] ? JSON.parse(localStorage["mutes"]) : {}; + } + catch (e) { + delete localStorage["mutes"] + window.MUTES = {} + } } $(".mute").live("click", function(){ $(this).removeClass("mute"); -- cgit v1.2.3-70-g09d2