summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulie Lala <jules@okfoc.us>2014-06-24 19:04:51 -0400
committerJulie Lala <jules@okfoc.us>2014-06-24 19:04:51 -0400
commite923a60f4310f6c0179f56a426647222edc620d9 (patch)
tree5bd315fc8d4f03f5bef1b0c25e24e9f028c5bbe3
parentaa061952dd30c8dc661733caf08406bd03bb200d (diff)
error checK
-rw-r--r--static/js/pichat.js8
-rw-r--r--static/js/pichat2.js8
-rw-r--r--static/js/src/userlist.js8
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");