Add "yours" property to "Post" class, use it for backlinks

This commit is contained in:
Zixaphir 2013-03-17 11:36:02 -07:00
parent 56313213d1
commit 6fa291468d
4 changed files with 10 additions and 6 deletions

File diff suppressed because one or more lines are too long

View File

@ -536,7 +536,6 @@ a[href="javascript:;"] {
-webkit-flex: 1;
flex: 1;
}
.persona .field:hover,
.persona .field:focus {
-webkit-flex: 4;
flex: 4;

View File

@ -2683,7 +2683,7 @@ QuoteBacklink =
a = $.el 'a',
href: "/#{@board}/res/#{@thread}#p#{@}"
className: if @isHidden then 'filtered backlink' else 'backlink'
textContent: QuoteBacklink.funk @ID
textContent: (QuoteBacklink.funk @ID) + (if Conf['Mark Quotes of You'] and @info.yours then QuoteYou.text else '')
for quote in @quotes
containers = [QuoteBacklink.getContainer quote]
if (post = g.posts[quote]) and post.nodes.backlinkContainer

View File

@ -65,6 +65,8 @@ class Post
if date = $ '.dateTime', info
@nodes.date = date
@info.date = new Date date.dataset.utc * 1000
if Conf['Quick Reply']
@info.yours = !!QR.yourPosts.threads[@thread.ID]?.contains(@ID)
@parseComment()
@parseQuotes()