});
});
+ /* mark everything as known on click. */
+ $(postElement).click(function() {
+ markPostAsKnown(this);
+ });
+
/* hide reply input field. */
$(postElement).find(".create-reply").addClass("hidden");
}
});
})(replyElement);
addCommentLink(getPostId(replyElement), replyElement, $(replyElement).find(".reply-status-line .time"));
+
+ /* mark post and all replies as known on click. */
+ $(replyElement).click(function() {
+ markPostAsKnown(getPostElement(replyElement));
+ });
}
/**
loadedPosts[postId] = true;
$.getJSON("ajax/getPost.ajax", { "post" : postId }, function(data, textStatus) {
if ((data != null) && data.success) {
+ /* maybe weird timing stuff ensues. */
+ if (data.post.id in loadedPosts) {
+ return;
+ }
var firstOlderPost = null;
$("#sone .post").each(function() {
if (getPostTime(this) < data.post.time) {
return false;
}
});
- newPost = $(data.post.html).addClass("hidden");
if (firstOlderPost != null) {
newPost.insertBefore(firstOlderPost);
} else {
$.getJSON("ajax/getReply.ajax", { "reply": replyId }, function(data, textStatus) {
/* find post. */
if ((data != null) && data.success) {
+ /* maybe weird timing stuff ensues. */
+ if (data.reply.id in loadedReplies) {
+ return;
+ }
$("#sone .post#" + data.reply.postId).each(function() {
var firstNewerReply = null;
$(this).find(".replies .reply").each(function() {
return false;
}
});
- newReply = $(data.reply.html).addClass("hidden");
if (firstNewerReply != null) {
newReply.insertBefore(firstNewerReply);
} else {