Simplify QuoteMarkers.parseQuotelink arguments.

This commit is contained in:
Mayhem 2014-02-15 22:24:10 +01:00
parent 004c3f74ed
commit 7df0fd1414
3 changed files with 6 additions and 10 deletions

View File

@ -179,9 +179,7 @@ class Post
for quotelink in Get.allQuotelinksLinkingTo @ when not $.hasClass quotelink, 'deadlink' for quotelink in Get.allQuotelinksLinkingTo @ when not $.hasClass quotelink, 'deadlink'
$.addClass quotelink, 'deadlink' $.addClass quotelink, 'deadlink'
continue unless Conf['Quote Markers'] continue unless Conf['Quote Markers']
post = Get.postFromNode quotelink QuoteMarkers.parseQuotelink Get.postFromNode(quotelink), quotelink, true
{board, thread} = if post.isClone then post.context else post
QuoteMarkers.parseQuotelink board, thread, post, quotelink, true
return return
# XXX tmp fix for 4chan's racing condition # XXX tmp fix for 4chan's racing condition
# giving us false-positive dead posts. # giving us false-positive dead posts.
@ -203,9 +201,7 @@ class Post
for quotelink in Get.allQuotelinksLinkingTo @ when $.hasClass quotelink, 'deadlink' for quotelink in Get.allQuotelinksLinkingTo @ when $.hasClass quotelink, 'deadlink'
$.rmClass quotelink, 'deadlink' $.rmClass quotelink, 'deadlink'
continue unless Conf['Quote Markers'] continue unless Conf['Quote Markers']
post = Get.postFromNode quotelink QuoteMarkers.parseQuotelink Get.postFromNode(quotelink), quotelink, true
{board, thread} = if post.isClone then post.context else post
QuoteMarkers.parseQuotelink board, thread, post, quotelink, true
return return
collect: -> collect: ->

View File

@ -53,7 +53,7 @@ QuoteBacklink =
if post.isHidden if post.isHidden
$.addClass a, 'filtered' $.addClass a, 'filtered'
if Conf['Quote Markers'] if Conf['Quote Markers']
QuoteMarkers.parseQuotelink post.board, post.thread, post, a, false, text QuoteMarkers.parseQuotelink post, a, false, text
if Conf['Quote Previewing'] if Conf['Quote Previewing']
$.on a, 'mouseover', QuotePreview.mouseover $.on a, 'mouseover', QuotePreview.mouseover
if Conf['Quote Inlining'] if Conf['Quote Inlining']

View File

@ -6,11 +6,11 @@ QuoteMarkers =
name: 'Quote Markers' name: 'Quote Markers'
cb: @node cb: @node
node: -> node: ->
{board, thread} = if @isClone then @context else @
for quotelink in @nodes.quotelinks for quotelink in @nodes.quotelinks
QuoteMarkers.parseQuotelink board, thread, @, quotelink, !!@isClone QuoteMarkers.parseQuotelink @, quotelink, !!@isClone
return return
parseQuotelink: (board, thread, post, quotelink, mayReset, customText) -> parseQuotelink: (post, quotelink, mayReset, customText) ->
{board, thread} = if post.isClone then post.context else post
markers = [] markers = []
{boardID, threadID, postID} = Get.postDataFromLink quotelink {boardID, threadID, postID} = Get.postDataFromLink quotelink