From f09bfa48e261d23aec6c4664e9b53aea013a008b Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Sat, 26 Nov 2011 18:53:27 +0100 Subject: [PATCH] Fix forward links for Firefox. WTF is wrong with that browser, seriously. --- 4chan_x.user.js | 2 +- script.coffee | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index 5bc0d2096..28dda4c5c 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -2486,7 +2486,7 @@ qp.innerHTML = el.innerHTML; if (conf['Quote Highlighting']) $.addClass(el, 'qphl'); if (/\bbacklink\b/.test(this.className)) { - replyID = $.x('preceding::input', this).name; + replyID = $.x('preceding-sibling::input', this.parentNode).name; _ref = $$('.quotelink', qp); _results = []; for (_i = 0, _len = _ref.length; _i < _len; _i++) { diff --git a/script.coffee b/script.coffee index d3ef50426..35fa2920c 100644 --- a/script.coffee +++ b/script.coffee @@ -1936,7 +1936,7 @@ quotePreview = qp.innerHTML = el.innerHTML $.addClass el, 'qphl' if conf['Quote Highlighting'] if /\bbacklink\b/.test @className - replyID = $.x('preceding::input', @).name + replyID = $.x('preceding-sibling::input', @parentNode).name for quote in $$ '.quotelink', qp if quote.hash[1..] is replyID quote.className = 'forwardlink'