diff --git a/boards/static/js/main.js b/boards/static/js/main.js old mode 100644 new mode 100755 --- a/boards/static/js/main.js +++ b/boards/static/js/main.js @@ -136,7 +136,7 @@ function processVolumeUser(node) { function getHiddenPosts() { var arr = Array(); - var hiddenPosts = localStorage.getItem(ITEM_HIDDEN_POSTS); + var hiddenPosts = localStorage && localStorage.getItem(ITEM_HIDDEN_POSTS); if (hiddenPosts) { arr = JSON.parse(hiddenPosts); } @@ -144,6 +144,7 @@ function getHiddenPosts() { } function processPostHiding(posts) { + if (!window.localStorage) return; var hiddenPosts = getHiddenPosts(); $.each(posts, function(index) { @@ -267,7 +268,8 @@ function addContextMenu() { name: gettext('Hide/show'), callback: function(key, opt) { togglePostHidden(postId); - } + }, + visible: !!localStorage }, edit: { name: gettext('Edit'),