X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fresources%2Fstatic%2Fjavascript%2Fsone.js;h=d9c2fb3d3d8d54d8ee673376f81a076608878dda;hp=90bd58b9fbae42e3bb3a5026985a8cb106f0cf7a;hb=b4e1998759191eaa6378cd1b99113d95abac63dd;hpb=25d95a78644c18f7b8f5e92e430776c5cd3d8c9d diff --git a/src/main/resources/static/javascript/sone.js b/src/main/resources/static/javascript/sone.js index 90bd58b..d9c2fb3 100644 --- a/src/main/resources/static/javascript/sone.js +++ b/src/main/resources/static/javascript/sone.js @@ -847,12 +847,14 @@ function ajaxifyPost(postElement) { }); /* mark everything as known on click. */ - $(postElement).click(function(event) { - if ($(event.target).hasClass("click-to-show")) { - return false; - } - markPostAsKnown(this); - }); + (function(postElement) { + $(postElement).click(function(event) { + if ($(event.target).hasClass("click-to-show")) { + return false; + } + markPostAsKnown(postElement, false); + }); + })(postElement); /* hide reply input field. */ $(postElement).find(".create-reply").addClass("hidden"); @@ -1536,7 +1538,7 @@ function markPostAsKnown(postElements, skipRequest) { } $(".click-to-show", postElement).removeClass("new"); }); - markReplyAsKnown($(postElements).find(".reply")); + markReplyAsKnown($(postElements).find(".reply"), true); } function markReplyAsKnown(replyElements, skipRequest) {