Shave a line and move a few things around in QuoteOP.

This commit is contained in:
Mayhem 2013-08-13 19:10:57 +02:00
parent 46c50baaba
commit b7ddfa5c66

View File

@ -12,18 +12,17 @@ QuoteOP =
return if @isClone and @thread is @context.thread
# Stop there if there's no quotes in that post.
return unless (quotes = @quotes).length
{quotelinks} = @nodes
# rm (OP) from cross-thread quotes.
if @isClone and @thread.fullID in quotes
for quotelink in quotelinks
quotelink.textContent = quotelink.textContent.replace QuoteOP.text, ''
op = (if @isClone then @context else @).thread.fullID
{fullID} = (if @isClone then @context else @).thread
# add (OP) to quotes quoting this context's OP.
return unless op in quotes
for quotelink in quotelinks
return unless fullID in quotes
for quotelink in @nodes.quotelinks
{boardID, postID} = Get.postDataFromLink quotelink
if "#{boardID}.#{postID}" is op
if "#{boardID}.#{postID}" is fullID
$.add quotelink, $.tn QuoteOP.text
return