From 257a31f8be2634152ea168ef1ee3b4a67c5d801c Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Sat, 18 Feb 2012 01:25:46 +0100 Subject: [PATCH] So contains() was actually useful for hidden threads. --- 4chan_x.user.js | 2 +- script.coffee | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index f9141bc32..856d64190 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -3095,7 +3095,7 @@ node: function(root) { var path, quote, tid, _i, _len, _ref; if (root.className === 'inline') return; - tid = g.THREAD_ID || $.x('ancestor::div[@class="thread"]', root).firstChild.id; + tid = g.THREAD_ID || $.x('ancestor::div[contains(@class,"thread")]', root).firstChild.id; _ref = $$('.quotelink', root); for (_i = 0, _len = _ref.length; _i < _len; _i++) { quote = _ref[_i]; diff --git a/script.coffee b/script.coffee index caba5ac8e..f748332ba 100644 --- a/script.coffee +++ b/script.coffee @@ -2439,7 +2439,8 @@ quoteIndicators = g.callbacks.push @node node: (root) -> return if root.className is 'inline' - tid = g.THREAD_ID or $.x('ancestor::div[@class="thread"]', root).firstChild.id + # We use contains() so that it works with hidden threads + tid = g.THREAD_ID or $.x('ancestor::div[contains(@class,"thread")]', root).firstChild.id for quote in $$ '.quotelink', root if conf['Indicate OP quote'] and quote.hash[1..] is tid # \u00A0 is nbsp