From 9e5ccf155da2ffd41dbded2b1dac51cba17ef484 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Thu, 28 Apr 2016 10:03:19 -0700 Subject: [PATCH] Let Post class handle parsing reply link. --- src/Miscellaneous/ThreadLinks.coffee | 2 +- src/classes/Post.Clone.coffee | 3 +++ src/classes/Post.coffee | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Miscellaneous/ThreadLinks.coffee b/src/Miscellaneous/ThreadLinks.coffee index 36a701e3a..30cc92c6d 100644 --- a/src/Miscellaneous/ThreadLinks.coffee +++ b/src/Miscellaneous/ThreadLinks.coffee @@ -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 diff --git a/src/classes/Post.Clone.coffee b/src/classes/Post.Clone.coffee index 4f3afb7c1..c807c53ad 100644 --- a/src/classes/Post.Clone.coffee +++ b/src/classes/Post.Clone.coffee @@ -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 diff --git a/src/classes/Post.coffee b/src/classes/Post.coffee index 7edc7a39c..471c45d5d 100644 --- a/src/classes/Post.coffee +++ b/src/classes/Post.coffee @@ -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']