From 08b8b878e16fdcfe424179aa2fcc76fd49f14bf9 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Sun, 9 Oct 2016 22:19:49 -0700 Subject: [PATCH] Fix errors from reply hiding button placement. --- src/Filtering/PostHiding.coffee | 11 ++++++++--- src/site/SW.yotsuba.coffee | 1 + 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/Filtering/PostHiding.coffee b/src/Filtering/PostHiding.coffee index 586aab3ca..ebabee867 100644 --- a/src/Filtering/PostHiding.coffee +++ b/src/Filtering/PostHiding.coffee @@ -24,9 +24,14 @@ PostHiding = Recursive.add PostHiding.hide, @, data.makeStub, true return unless Conf['Reply Hiding Buttons'] - sideArrows = $('.sideArrows', @nodes.root) - $.replace sideArrows.firstChild, PostHiding.makeButton @, 'hide' - sideArrows.removeAttribute 'class' + + button = PostHiding.makeButton @, 'hide' + if (sa = Site.selectors.sideArrows) + sideArrows = $ sa, @nodes.root + $.replace sideArrows.firstChild, button + sideArrows.removeAttribute 'class' + else + $.prepend @nodes.root, button menu: init: -> diff --git a/src/site/SW.yotsuba.coffee b/src/site/SW.yotsuba.coffee index 961555d5d..28585216f 100644 --- a/src/site/SW.yotsuba.coffee +++ b/src/site/SW.yotsuba.coffee @@ -5,6 +5,7 @@ SW.yotsuba = board: '.board' thread: '.thread' postContainer: '.postContainer' + sideArrows: '.sideArrows' post: '.post' infoRoot: '.postInfo' info: