From b99ac6d53ac16a06a08e4d0bd3d938151f203495 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Sun, 21 Sep 2014 14:01:11 -0700 Subject: [PATCH] menu bugfixes --- src/Filtering/PostHiding.coffee | 2 +- src/Filtering/ThreadHiding.coffee | 6 +++--- src/General/Index.coffee | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Filtering/PostHiding.coffee b/src/Filtering/PostHiding.coffee index 576df9084..8d409f030 100755 --- a/src/Filtering/PostHiding.coffee +++ b/src/Filtering/PostHiding.coffee @@ -197,7 +197,7 @@ PostHiding = className: 'stub' $.add post.nodes.stub, a if Conf['Menu'] - $.add post.nodes.stub, Menu.makeButton() + $.add post.nodes.stub, Menu.makeButton post $.prepend post.nodes.root, post.nodes.stub show: (post, showRecursively=Conf['Recursive Hiding']) -> diff --git a/src/Filtering/ThreadHiding.coffee b/src/Filtering/ThreadHiding.coffee index 31e4c130f..a63eb8e8d 100755 --- a/src/Filtering/ThreadHiding.coffee +++ b/src/Filtering/ThreadHiding.coffee @@ -97,7 +97,7 @@ ThreadHiding = el: div order: 20 open: ({thread, isReply}) -> - if isReply or !thread.isHidden + if isReply or !thread.isHidden or Conf['JSON Navigation'] and Conf['Index Mode'] is 'catalog' return false ThreadHiding.menu.thread = thread true @@ -111,7 +111,7 @@ ThreadHiding = el: hideStubLink order: 15 open: ({thread, isReply}) -> - if isReply or !thread.isHidden + if isReply or !thread.isHidden or Conf['JSON Navigation'] and Conf['Index Mode'] is 'catalog' return false ThreadHiding.menu.thread = thread @@ -155,7 +155,7 @@ ThreadHiding = thread.stub = $.el 'div', className: 'stub' if Conf['Menu'] - $.add thread.stub, [a, Menu.makeButton()] + $.add thread.stub, [a, Menu.makeButton thread.OP] else $.add thread.stub, a $.prepend root, thread.stub diff --git a/src/General/Index.coffee b/src/General/Index.coffee index ba1bac15e..45a25a2bd 100644 --- a/src/General/Index.coffee +++ b/src/General/Index.coffee @@ -138,11 +138,11 @@ Index = menu: init: -> - return if g.VIEW isnt 'index' or !Conf['JSON Navigation'] or !Conf['Menu'] or g.BOARD.ID is 'f' + return if g.VIEW isnt 'index' or !Conf['JSON Navigation'] or !Conf['Menu'] or !Conf['Thread Hiding Link'] or g.BOARD.ID is 'f' Menu.menu.addEntry el: $.el 'a', href: 'javascript:;' - order: 5 + order: 20 open: ({thread}) -> return false if Conf['Index Mode'] isnt 'catalog' @el.textContent = if thread.isHidden