diff --git a/4chan_x.user.js b/4chan_x.user.js index 202a2ab26..f3e4bb23f 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -910,7 +910,7 @@ rect = td.getBoundingClientRect(); if (rect.top > 0 && rect.bottom < d.body.clientHeight) { next = $.x('following::td[@class="reply"]', td); - if ($.x('ancestor::div[@class="thread"]/div', next) !== thread) { + if ($.x('ancestor::div[@class="thread"]', next) !== thread) { return; } rect = next.getBoundingClientRect(); diff --git a/script.coffee b/script.coffee index f7abf1d2d..f1282f8b4 100644 --- a/script.coffee +++ b/script.coffee @@ -659,7 +659,7 @@ keybinds = rect = td.getBoundingClientRect() if rect.top > 0 and rect.bottom < d.body.clientHeight #you're fully visible next = $.x 'following::td[@class="reply"]', td - return if $.x('ancestor::div[@class="thread"]/div', next) isnt thread + return if $.x('ancestor::div[@class="thread"]', next) isnt thread rect = next.getBoundingClientRect() if rect.top > 0 and rect.bottom < d.body.clientHeight #and so is the next next.className = 'replyhl'