From 49c8f7f85352b6af92ab48dd3741baea7f9ec16f Mon Sep 17 00:00:00 2001 From: TOW Date: Mon, 1 Apr 2019 20:08:43 -0300 Subject: Shobon: Fix localstorage Shobon estaba escribiendo un montón de info en el localStorage aunque la funcionalidad de Destacar mensajes estuviera apagada. --- static/js/shobon.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'static/js') diff --git a/static/js/shobon.js b/static/js/shobon.js index 69b789a..31fab9a 100644 --- a/static/js/shobon.js +++ b/static/js/shobon.js @@ -43,8 +43,7 @@ function shobon() { } var lastReplyN = replyList[replyList.length - 1].attributes["data-n"].value; - - if (localStorage.getItem(boardName + "_" + threadId) == null) { + if(localStorage.getItem("shobon_newposts") == "true" && localStorage.getItem(boardName + "_" + threadId) == null) { localStorage.setItem(boardName + "_" + threadId, lastReplyN); } var lastSeen = localStorage.getItem(boardName + "_" + threadId); @@ -101,10 +100,9 @@ function shobon() { document.body.appendChild(banner); } - if (inThread) { + if(localStorage.getItem("shobon_newposts") == "true" && inThread) { localStorage.setItem(boardName + "_" + threadId, lastReplyN); } - } function on_checked(e) { -- cgit v1.2.1-18-gbd029