diff options
| -rw-r--r-- | static/js/pichat.js | 8 | ||||
| -rw-r--r-- | static/js/pichat2.js | 8 | ||||
| -rw-r--r-- | static/js/src/userlist.js | 8 |
3 files changed, 18 insertions, 6 deletions
diff --git a/static/js/pichat.js b/static/js/pichat.js index dc3b43b..b0bba88 100644 --- a/static/js/pichat.js +++ b/static/js/pichat.js @@ -2248,8 +2248,12 @@ function linkReplaceWithoutImage(url){ return "<a target='_blank' href='" + linkUrl + "'>" + url + "</a>" } -var MUTES = localStorage["mutes"] ? JSON.parse(localStorage["mutes"]) : {}; - +try { + var MUTES = localStorage["mutes"] ? JSON.parse(localStorage["mutes"]) : {}; +} +catch (e) { + delete localStorage["mutes"] +} $(".mute").live("click", function(){ $(this).removeClass("mute"); $(this).addClass("unmute"); diff --git a/static/js/pichat2.js b/static/js/pichat2.js index dc3b43b..b0bba88 100644 --- a/static/js/pichat2.js +++ b/static/js/pichat2.js @@ -2248,8 +2248,12 @@ function linkReplaceWithoutImage(url){ return "<a target='_blank' href='" + linkUrl + "'>" + url + "</a>" } -var MUTES = localStorage["mutes"] ? JSON.parse(localStorage["mutes"]) : {}; - +try { + var MUTES = localStorage["mutes"] ? JSON.parse(localStorage["mutes"]) : {}; +} +catch (e) { + delete localStorage["mutes"] +} $(".mute").live("click", function(){ $(this).removeClass("mute"); $(this).addClass("unmute"); diff --git a/static/js/src/userlist.js b/static/js/src/userlist.js index d18da65..3ccb9b2 100644 --- a/static/js/src/userlist.js +++ b/static/js/src/userlist.js @@ -1,5 +1,9 @@ -var MUTES = localStorage["mutes"] ? JSON.parse(localStorage["mutes"]) : {}; - +try { + var MUTES = localStorage["mutes"] ? JSON.parse(localStorage["mutes"]) : {}; +} +catch (e) { + delete localStorage["mutes"] +} $(".mute").live("click", function(){ $(this).removeClass("mute"); $(this).addClass("unmute"); |
