X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fresources%2Fstatic%2Fjavascript%2Fsone.js;h=e07a08b982ebd4e30b0b396a72dc9eeaaa085319;hb=13871054ecbb38722714d7e0c88c4024103c3f86;hp=9c082f178b43250365d13a740bee9fe9a51a9104;hpb=83c775be91db2ac0b95afa4976a8c9bdfa611d31;p=Sone.git diff --git a/src/main/resources/static/javascript/sone.js b/src/main/resources/static/javascript/sone.js index 9c082f1..e07a08b 100644 --- a/src/main/resources/static/javascript/sone.js +++ b/src/main/resources/static/javascript/sone.js @@ -1302,12 +1302,12 @@ function markPostAsKnown(postElements, skipRequest) { if ($(postElement).hasClass("new")) { (function(postElement) { $(postElement).removeClass("new"); - $(".click-to-show", postElement).removeClass("new"); if ((typeof skipRequest == "undefined") || !skipRequest) { ajaxGet("markAsKnown.ajax", {"formPassword": getFormPassword(), "type": "post", "id": getPostId(postElement)}); } })(postElement); } + $(".click-to-show", postElement).removeClass("new"); }); markReplyAsKnown($(postElements).find(".reply")); } @@ -1709,7 +1709,7 @@ $(document).ready(function() { allReplies = $(this).find(".reply"); if (allReplies.length > 2) { newHidden = false; - for (replyIndex = 0; replyIndex < (allReplies.length - 2); ++replyIndex) { + for (replyIndex = 0; !newHidden && (replyIndex < (allReplies.length - 2)); ++replyIndex) { $(allReplies[replyIndex]).addClass("hidden"); newHidden |= $(allReplies[replyIndex]).hasClass("new"); }