removeddit/jst/comment.jst
2017-11-16 18:41:32 +01:00

25 lines
1.1 KiB
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<%
var isRemoved = _.has(comment,"removed");
var isDeleted = _.has(comment,"deleted");
var commentCss = "comment comment-" + (isRemoved ? "removed" : (isDeleted ? "deleted" : (comment.depth % 2 == 0 ? "even" : "odd")));
%>
<div id="<%= id %>" class="<%= commentCss %>">
<div class="comment-head">
<a href="javascript:void(0)" class="author">[]</a>
<a href="https://www.reddit.com/user/<%= comment.author %>" class="author comment-author">
<%= comment.author+(isDeleted ? " (deleted by user)" : "") %>
</a>
<span class="comment-score"><%= Format.prettyScore(comment.score) %> point<%= ((comment.score == 1) ? "": "s") %></span>
<span class="comment-time"><%= Format.prettyDate(comment.created_utc) %></span>
</div>
<div class="comment-body">
<%= (comment.body === "[removed]" && isRemoved ? "<p>[likely removed by automoderator]</p>" : Format.parse(comment.body)) %>
</div>
<div class="comment-links">
<a href="/r/<%= Reddit.subreddit %>/comments/<%= Reddit.threadID %>/_/<%= id %>/">permalink</a>
<a href="https://www.reddit.com/r/<%= Reddit.subreddit %>/comments/<%= Reddit.threadID %>/_/<%= id %>/">reddit</a>
</div>
</div>