Fix quote highlighting.

This commit is contained in:
Zixaphir 2014-03-10 12:17:43 -07:00
parent c6954ee1bb
commit 6b712a5c0d
5 changed files with 45 additions and 20 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -801,7 +801,7 @@ span.hide-announcement {
.qphl {
outline: 2px solid rgba(216, 94, 49, .7);
}
:root.highlight-own .yourPost > .reply,
:root.highlight-own .your-post > .reply,
:root.highlight-you .quotesYou > .reply {
border-left: 2px solid rgba(221,0,0,.5);
}

View File

@ -79,7 +79,7 @@ DeleteLink =
cooldown:
start: (post, node) ->
unless QR.db?.get {boardID: post.board.ID, threadID: post.thread.ID, postID: post.ID}
unless QR.db.get {boardID: post.board.ID, threadID: post.thread.ID, postID: post.ID}
# Only start counting on our posts.
delete DeleteLink.cooldown.counting
return

View File

@ -1,5 +1,11 @@
QuoteMarkers =
init: ->
if Conf['Highlight Own Posts']
$.addClass doc, 'highlight-own'
if Conf['Highlight Posts Quoting You']
$.addClass doc, 'highlight-you'
Post.callbacks.push
name: 'Quote Markers'
cb: @node
@ -15,8 +21,9 @@ QuoteMarkers =
markers = []
{boardID, threadID, postID} = Get.postDataFromLink quotelink
if Conf['Mark Quotes of You'] and QR.db?.get {boardID, threadID, postID}
markers.push 'You'
if QR.db.get {boardID, threadID, postID}
markers.push 'You' if Conf['Mark Quotes of You']
$.addClass @nodes.root, 'quotesYou'
if board.ID is boardID
if Conf['Mark OP Quotes'] and thread.ID is postID