Let Post class handle parsing reply link.

This commit is contained in:
ccd0 2016-04-28 10:03:19 -07:00
parent 2e8a187e26
commit 9e5ccf155d
3 changed files with 6 additions and 2 deletions

View File

@ -11,7 +11,7 @@ ThreadLinks =
node: ->
return if @isReply or @isClone
ThreadLinks.process $('.replylink', @nodes.info)
ThreadLinks.process @nodes.reply
catalogNode: ->
ThreadLinks.process @nodes.thumb.parentNode

View File

@ -36,6 +36,9 @@ Post.Clone = class extends Post
else
@nodes.backlinks = info.getElementsByClassName 'backlink'
unless @isReply
@nodes.reply = $ '.replylink', info
# Remove inlined posts inside of this post.
for inline in $$ '.inline', post
$.rm inline

View File

@ -33,12 +33,13 @@ class Post
else
@nodes.backlinks = info.getElementsByClassName 'backlink'
unless @isReply = $.hasClass post, 'reply'
unless (@isReply = $.hasClass post, 'reply')
@thread.OP = @
@thread.isArchived = !!$ '.archivedIcon', info
@thread.isSticky = !!$ '.stickyIcon', info
@thread.isClosed = @thread.isArchived or !!$ '.closedIcon', info
@thread.kill() if @thread.isArchived
@nodes.reply = $ '.replylink', info
@info = {}
@info.nameBlock = if Conf['Anonymize']