diff options
| author | dumpfmprod <dumpfmprod@ubuntu.(none)> | 2014-06-24 18:53:04 -0400 |
|---|---|---|
| committer | dumpfmprod <dumpfmprod@ubuntu.(none)> | 2014-06-24 18:53:04 -0400 |
| commit | 557046a95fb06174f6a4b8f6f9f92c6719604f52 (patch) | |
| tree | b949bb2a8e76b345d3a6d1b74fca7c1dd9429d86 /static | |
| parent | 86d9c86a4d51d68f12892fa7f5879d5d5eb3e047 (diff) | |
| parent | 948926970571793e774ebf34c16e14ef8e694062 (diff) | |
Merge branch 'master' of /pichat/repo
Diffstat (limited to 'static')
| -rw-r--r-- | static/js/pichat.js | 9 | ||||
| -rw-r--r-- | static/js/pichat2.js | 9 | ||||
| -rw-r--r-- | static/js/src/chat.js | 3 | ||||
| -rw-r--r-- | static/js/src/userlist.js | 6 |
4 files changed, 24 insertions, 3 deletions
diff --git a/static/js/pichat.js b/static/js/pichat.js index 61489c0..2cee712 100644 --- a/static/js/pichat.js +++ b/static/js/pichat.js @@ -486,6 +486,9 @@ function setImgsEnable() { } }; +function text_off(){ + setTextEnable.call( $("#textbutton input").attr("checked", false) ) +} // scrolling stuff // this code keeps the div scrolled to the bottom, but will also let the user scroll up, without jumping down @@ -2245,7 +2248,7 @@ function linkReplaceWithoutImage(url){ return "<a target='_blank' href='" + linkUrl + "'>" + url + "</a>" } -var MUTES = {}; +var MUTES = localStorage['mutes']['nick']; $(".mute").live("click", function(){ $(this).removeClass("mute"); $(this).addClass("unmute"); @@ -2253,6 +2256,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"); @@ -2261,6 +2266,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) { diff --git a/static/js/pichat2.js b/static/js/pichat2.js index 61489c0..2cee712 100644 --- a/static/js/pichat2.js +++ b/static/js/pichat2.js @@ -486,6 +486,9 @@ function setImgsEnable() { } }; +function text_off(){ + setTextEnable.call( $("#textbutton input").attr("checked", false) ) +} // scrolling stuff // this code keeps the div scrolled to the bottom, but will also let the user scroll up, without jumping down @@ -2245,7 +2248,7 @@ function linkReplaceWithoutImage(url){ return "<a target='_blank' href='" + linkUrl + "'>" + url + "</a>" } -var MUTES = {}; +var MUTES = localStorage['mutes']['nick']; $(".mute").live("click", function(){ $(this).removeClass("mute"); $(this).addClass("unmute"); @@ -2253,6 +2256,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"); @@ -2261,6 +2266,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) { diff --git a/static/js/src/chat.js b/static/js/src/chat.js index f24917c..e59e948 100644 --- a/static/js/src/chat.js +++ b/static/js/src/chat.js @@ -207,6 +207,9 @@ function setImgsEnable() { } }; +function text_off(){ + setTextEnable.call( $("#textbutton input").attr("checked", false) ) +} // scrolling stuff // this code keeps the div scrolled to the bottom, but will also let the user scroll up, without jumping down 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) { |
