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 { .qphl {
outline: 2px solid rgba(216, 94, 49, .7); outline: 2px solid rgba(216, 94, 49, .7);
} }
:root.highlight-own .yourPost > .reply, :root.highlight-own .your-post > .reply,
:root.highlight-you .quotesYou > .reply { :root.highlight-you .quotesYou > .reply {
border-left: 2px solid rgba(221,0,0,.5); border-left: 2px solid rgba(221,0,0,.5);
} }

View File

@ -79,7 +79,7 @@ DeleteLink =
cooldown: cooldown:
start: (post, node) -> 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. # Only start counting on our posts.
delete DeleteLink.cooldown.counting delete DeleteLink.cooldown.counting
return return

View File

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