Let Post class handle parsing reply link.
This commit is contained in:
parent
2e8a187e26
commit
9e5ccf155d
@ -11,7 +11,7 @@ ThreadLinks =
|
|||||||
|
|
||||||
node: ->
|
node: ->
|
||||||
return if @isReply or @isClone
|
return if @isReply or @isClone
|
||||||
ThreadLinks.process $('.replylink', @nodes.info)
|
ThreadLinks.process @nodes.reply
|
||||||
|
|
||||||
catalogNode: ->
|
catalogNode: ->
|
||||||
ThreadLinks.process @nodes.thumb.parentNode
|
ThreadLinks.process @nodes.thumb.parentNode
|
||||||
|
|||||||
@ -36,6 +36,9 @@ Post.Clone = class extends Post
|
|||||||
else
|
else
|
||||||
@nodes.backlinks = info.getElementsByClassName 'backlink'
|
@nodes.backlinks = info.getElementsByClassName 'backlink'
|
||||||
|
|
||||||
|
unless @isReply
|
||||||
|
@nodes.reply = $ '.replylink', info
|
||||||
|
|
||||||
# Remove inlined posts inside of this post.
|
# Remove inlined posts inside of this post.
|
||||||
for inline in $$ '.inline', post
|
for inline in $$ '.inline', post
|
||||||
$.rm inline
|
$.rm inline
|
||||||
|
|||||||
@ -33,12 +33,13 @@ class Post
|
|||||||
else
|
else
|
||||||
@nodes.backlinks = info.getElementsByClassName 'backlink'
|
@nodes.backlinks = info.getElementsByClassName 'backlink'
|
||||||
|
|
||||||
unless @isReply = $.hasClass post, 'reply'
|
unless (@isReply = $.hasClass post, 'reply')
|
||||||
@thread.OP = @
|
@thread.OP = @
|
||||||
@thread.isArchived = !!$ '.archivedIcon', info
|
@thread.isArchived = !!$ '.archivedIcon', info
|
||||||
@thread.isSticky = !!$ '.stickyIcon', info
|
@thread.isSticky = !!$ '.stickyIcon', info
|
||||||
@thread.isClosed = @thread.isArchived or !!$ '.closedIcon', info
|
@thread.isClosed = @thread.isArchived or !!$ '.closedIcon', info
|
||||||
@thread.kill() if @thread.isArchived
|
@thread.kill() if @thread.isArchived
|
||||||
|
@nodes.reply = $ '.replylink', info
|
||||||
|
|
||||||
@info = {}
|
@info = {}
|
||||||
@info.nameBlock = if Conf['Anonymize']
|
@info.nameBlock = if Conf['Anonymize']
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user