diff --git a/4chan_x.js b/4chan_x.js index 14afa617e..71d848f0e 100644 --- a/4chan_x.js +++ b/4chan_x.js @@ -1894,7 +1894,7 @@ if (root.className === 'inline') { return; } - tid = g.THREAD_ID || root.parentNode.firstChild.id; + tid = g.THREAD_ID || $.x('ancestor::div[@class="thread"]/div', this).id; _ref = $$('a.quotelink', root); _results = []; for (_i = 0, _len = _ref.length; _i < _len; _i++) { diff --git a/script.coffee b/script.coffee index b8c56dd71..1b5864a7d 100644 --- a/script.coffee +++ b/script.coffee @@ -1495,7 +1495,7 @@ quoteOP = g.callbacks.push quoteOP.node node: (root) -> return if root.className is 'inline' - tid = g.THREAD_ID or root.parentNode.firstChild.id + tid = g.THREAD_ID or $.x('ancestor::div[@class="thread"]/div', this).id for quote in $$ 'a.quotelink', root if quote.hash[1..] is tid quote.textContent += ' (OP)'