summaryrefslogtreecommitdiff
path: root/static/js/src/userlist.js
diff options
context:
space:
mode:
authorJulie Lala <jules@okfoc.us>2014-06-24 18:48:38 -0400
committerJulie Lala <jules@okfoc.us>2014-06-24 18:48:38 -0400
commit0e9eb8b4fc0ef43f91b69749f276cadf2d3bb3ad (patch)
treea97e2ec71c982e67a58bf71d7de461effcecb1a8 /static/js/src/userlist.js
parent9c565b805bd0a3315ea56c5e9960f6846fe073be (diff)
mutes in localstorage??
Diffstat (limited to 'static/js/src/userlist.js')
-rw-r--r--static/js/src/userlist.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/static/js/src/userlist.js b/static/js/src/userlist.js
index 4af21c1..7ca4344 100644
--- a/static/js/src/userlist.js
+++ b/static/js/src/userlist.js
@@ -1,4 +1,4 @@
-var MUTES = {};
+var MUTES = localStorage['mutes']['nick'];
$(".mute").live("click", function(){
$(this).removeClass("mute");
$(this).addClass("unmute");
@@ -6,6 +6,8 @@ $(".mute").live("click", function(){
var nick = $(this).parent().children("a").html().replace(/<img[^>]+>/,"");
$(".nick_" + nick).hide();
MUTES[nick] = true;
+ localStorage['mutes'] = localStorage['mutes'] || {}
+ localStorage['mutes'][nick] = true
});
$(".unmute").live("click", function(){
$(this).removeClass("unmute");
@@ -14,6 +16,8 @@ $(".unmute").live("click", function(){
var nick = $(this).parent().children("a").html().replace(/<img[^>]+>/,"");
$(".nick_" + nick).show();
delete MUTES[nick];
+ localStorage['mutes'] = localStorage['mutes'] || {}
+ delete localStorage['mutes'][nick]
});
function buildUserDiv(user) {