From: David ‘Bombe’ Roden Date: Fri, 26 Nov 2010 05:52:53 +0000 (+0100) Subject: Marks posts as known when clicking a new post or reply. X-Git-Tag: 0.3.1-RC2~4 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=5db08d4142418ed4e53056bdda108d4de3f879e2;p=Sone.git Marks posts as known when clicking a new post or reply. --- diff --git a/src/main/resources/static/javascript/sone.js b/src/main/resources/static/javascript/sone.js index e07c51e..4b60dd9 100644 --- a/src/main/resources/static/javascript/sone.js +++ b/src/main/resources/static/javascript/sone.js @@ -608,7 +608,9 @@ function loadNewPost(postId) { return false; } }); - newPost = $(data.post.html).addClass("hidden"); + newPost = $(data.post.html).addClass("hidden").click(function() { + markPostAsKnown(this); + }); if (firstOlderPost != null) { newPost.insertBefore(firstOlderPost); } else { @@ -637,7 +639,9 @@ function loadNewReply(replyId) { return false; } }); - newReply = $(data.reply.html).addClass("hidden"); + newReply = $(data.reply.html).addClass("hidden").click(function() { + markPostAsKnown(getPostElement(this)); + }); if (firstNewerReply != null) { newReply.insertBefore(firstNewerReply); } else {