From e7e777e4c8a463d156d6efa0bae322ea32cb6ee0 Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Sun, 30 Oct 2011 20:33:33 +0100 Subject: [PATCH] Don't reveal hidden posts when uninlining quotes. --- 4chan_x.user.js | 13 ++++++------- script.coffee | 8 ++++---- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index 27731e1b9..1f5ff756a 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -2441,16 +2441,15 @@ } }, rm: function(q, id) { - var hidden, inlined, table, _i, _len, _ref; + var inlined, table, _i, _len, _ref; table = $.x("following::*[@id='i" + id + "']", q); - _ref = $$('input', table); + _ref = $$('.backlink.inlined:not(.filtered)', table); for (_i = 0, _len = _ref.length; _i < _len; _i++) { inlined = _ref[_i]; - if (hidden = $.id(inlined.name)) { - if (!hidden.classList.contains('op')) { - $.x('ancestor::table[1]', hidden).hidden = false; - } - } + $.x('ancestor::table[1]', $.id(inlined.hash.slice(1))).hidden = false; + } + if (!q.classList.contains('filtered')) { + $.x('ancestor::table[1]', $.id(id)).hidden = false; } return $.rm(table); }, diff --git a/script.coffee b/script.coffee index 9c70fd8bb..eec3c543e 100644 --- a/script.coffee +++ b/script.coffee @@ -1831,10 +1831,10 @@ quoteInline = rm: (q, id) -> #select the corresponding table or loading td table = $.x "following::*[@id='i#{id}']", q - for inlined in $$ 'input', table - if hidden = $.id inlined.name - unless hidden.classList.contains 'op' - $.x('ancestor::table[1]', hidden).hidden = false + for inlined in $$ '.backlink.inlined:not(.filtered)', table + $.x('ancestor::table[1]', $.id inlined.hash[1..]).hidden = false + unless q.classList.contains 'filtered' + $.x('ancestor::table[1]', $.id id).hidden = false $.rm table parse: (req, pathname, id, threadID, inline) ->