* @param element
* The element to add a “comment” link to
*/
-function addCommentLink(postId, element) {
+function addCommentLink(postId, element, insertAfterThisElement) {
if ($(element).find(".show-reply-form").length > 0) {
return;
}
});
return commentElement;
})(postId);
- $(element).find(".status-line .time").each(function() {
- $(this).after(commentElement.clone(true));
- });
+ $(insertAfterThisElement).after(commentElement.clone(true));
}
var translations = {};
});
});
})(replyElement);
- addCommentLink(getPostId(replyElement), replyElement);
+ addCommentLink(getPostId(replyElement), replyElement, $(replyElement).find(".reply-status-line .time"));
}
/**
<div class="author profile-link"><a href="viewSone.html?sone=<% post.sone.id|html>"><% post.sone.niceName|html></a></div>
<div class="text"><% post.text|html></div>
</div>
- <div class="status-line">
+ <div class="post-status-line status-line">
<div class="time"><a href="viewPost.html?post=<% post.id|html>"><% post.time|date format="MMM d, yyyy, HH:mm:ss"></a></div>
<div class="likes<%if post.likes.size|match value=0> hidden<%/if>"><span title="<% post.likes.soneNames|html>">⬆<span class="like-count"><% post.likes.size></span></span></div>
<%ifnull ! currentSone>
<div class="author profile-link"><a href="viewSone.html?sone=<% reply.sone.id|html>"><% reply.sone.niceName|html></a></div>
<div class="text"><% reply.text|html></div>
</div>
- <div class="status-line">
+ <div class="reply-status-line status-line">
<div class="time"><% reply.time|date format="MMM d, yyyy, HH:mm:ss"></div>
<div class="likes<%if reply.likes.size|match value=0> hidden<%/if>"><span title="<% reply.likes.soneNames|html>">⬆<span class="like-count"><% reply.likes.size></span></span></div>
<%ifnull ! currentSone>