From 8b0168c556482bde389c43a8b4115b8baaac0f85 Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Mon, 28 Nov 2011 22:35:02 +0100 Subject: [PATCH] Don't indicate duckrolls of cross-board quotes. --- 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 ae2a860da..be4f8facb 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -2592,7 +2592,7 @@ _results = []; for (_i = 0, _len = _ref.length; _i < _len; _i++) { quote = _ref[_i]; - if (quote.hash && quote.pathname.indexOf(tid) === -1) { + if (quote.pathname.indexOf("res/" + tid) === -1 && !quote.pathname.indexOf("/" + g.BOARD + "/res")) { _results.push(quote.innerHTML += ' (Duckroll)'); } else { _results.push(void 0); diff --git a/script.coffee b/script.coffee index 7502484c6..dcbea2bbe 100644 --- a/script.coffee +++ b/script.coffee @@ -2002,7 +2002,8 @@ quoteDR = return if root.className is 'inline' tid = g.THREAD_ID or $.x('ancestor::div[contains(@class,"thread")]/div', root).id for quote in $$ '.quotelink', root - if quote.hash and quote.pathname.indexOf(tid) is -1 + #if quote leads to a different thread id and is located on the same board (index 0) + if quote.pathname.indexOf("res/#{tid}") is -1 and !quote.pathname.indexOf "/#{g.BOARD}/res" quote.innerHTML += ' (Duckroll)' reportButton =