From 02ac826003bf5dca0ffc92c744a44834d5a367ce Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Wed, 13 Jun 2012 17:04:33 +0200 Subject: [PATCH] Reflect the stub filter parameter in recursive filtering. --- 4chan_x.user.js | 5 +++-- script.coffee | 4 +++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index 3dac75424..2f92de2d3 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -717,7 +717,7 @@ return Main.callbacks.push(this.node); }, node: function(post) { - var el, quote, _i, _len, _ref; + var el, quote, show_stub, _i, _len, _ref; if (post.isInlined) { return; } @@ -727,7 +727,8 @@ if ((el = $.id(quote.hash.slice(1))) && el.hidden) { $.addClass(quote, 'filtered'); if (Conf['Recursive Filtering']) { - ReplyHiding.hide(post.root); + show_stub = !!$.x('preceding-sibling::div[contains(@class,"stub")]', el); + ReplyHiding.hide(post.root, show_stub); } } } diff --git a/script.coffee b/script.coffee index a66f7f2fe..97c8dfd9a 100644 --- a/script.coffee +++ b/script.coffee @@ -564,7 +564,9 @@ StrikethroughQuotes = for quote in post.quotes if (el = $.id quote.hash[1..]) and el.hidden $.addClass quote, 'filtered' - ReplyHiding.hide post.root if Conf['Recursive Filtering'] + if Conf['Recursive Filtering'] + show_stub = !!$.x 'preceding-sibling::div[contains(@class,"stub")]', el + ReplyHiding.hide post.root, show_stub return ExpandComment =