From 66411f0b1ff572c366953364d5b76e5d9112c9aa Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Mon, 31 Oct 2011 17:44:24 +0100 Subject: [PATCH 1/2] Fix #362 --- 4chan_x.user.js | 6 +++--- script.coffee | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index ac47b4ec5..ff6f52407 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -2450,10 +2450,10 @@ _ref = $$('.backlink.inlined:not(.filtered)', table); for (_i = 0, _len = _ref.length; _i < _len; _i++) { inlined = _ref[_i]; - $.x('ancestor::table[1]', $.id(inlined.hash.slice(1))).hidden = false; + $.x('ancestor::table', $.id(inlined.hash.slice(1))).hidden = false; } - if (!q.classList.contains('filtered')) { - $.x('ancestor::table[1]', $.id(id)).hidden = false; + if (q.classList.contains('backlink') && !q.classList.contains('filtered')) { + $.x('ancestor::table', $.id(id)).hidden = false; } return $.rm(table); }, diff --git a/script.coffee b/script.coffee index 5c3a0bfed..a6b67f7db 100644 --- a/script.coffee +++ b/script.coffee @@ -1835,9 +1835,9 @@ quoteInline = #select the corresponding table or loading td table = $.x "following::*[@id='i#{id}']", q 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 + $.x('ancestor::table', $.id inlined.hash[1..]).hidden = false + if q.classList.contains('backlink') and not q.classList.contains 'filtered' + $.x('ancestor::table', $.id id).hidden = false $.rm table parse: (req, pathname, id, threadID, inline) -> From 6e0dadd5ec01047005687f8a1e0d8883b7cf9771 Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Mon, 31 Oct 2011 17:48:07 +0100 Subject: [PATCH 2/2] Fix #361 --- 4chan_x.user.js | 8 +++----- script.coffee | 7 +++---- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index ff6f52407..109014712 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -3097,11 +3097,6 @@ if (conf['Indicate OP quote']) { quoteOP.init(); } - if (g.REPLY) { - if (conf['Image Preloading']) { - imgPreloading.init(); - } - } if (d.body) { return Main.onLoad(); } else { @@ -3143,6 +3138,9 @@ if (conf['Thread Stats']) { threadStats.init(); } + if (conf['Image Preloading']) { + imgPreloading.init(); + } if (conf['Reply Navigation']) { nav.init(); } diff --git a/script.coffee b/script.coffee index a6b67f7db..8b5445afa 100644 --- a/script.coffee +++ b/script.coffee @@ -2359,10 +2359,6 @@ Main = if conf['Indicate OP quote'] quoteOP.init() - if g.REPLY - if conf['Image Preloading'] - imgPreloading.init() - if d.body Main.onLoad() @@ -2404,6 +2400,9 @@ Main = if conf['Thread Stats'] threadStats.init() + if conf['Image Preloading'] + imgPreloading.init() + if conf['Reply Navigation'] nav.init()