From 6d69ae3910f7b96c6282a3c6928d9cea46cf7495 Mon Sep 17 00:00:00 2001 From: James Campos Date: Fri, 29 Apr 2011 19:26:03 -0700 Subject: [PATCH] fix #42 --- 4chan_x.js | 4 ++-- script.coffee | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/4chan_x.js b/4chan_x.js index 846c2b5d3..74954f0d2 100644 --- a/4chan_x.js +++ b/4chan_x.js @@ -795,8 +795,7 @@ $.bind(prev, 'click', nav.prev); $.bind(next, 'click', nav.next); $.append(span, prev, $.tn(' '), next); - $.append(d.body, span); - return nav.threads = $$('div.thread'); + return $.append(d.body, span); }, prev: function() { return nav.scroll(-1); @@ -807,6 +806,7 @@ threads: [], getThread: function(full) { var bottom, i, rect, thread, _len, _ref; + nav.threads = $$('div.thread:not([style])'); _ref = nav.threads; for (i = 0, _len = _ref.length; i < _len; i++) { thread = _ref[i]; diff --git a/script.coffee b/script.coffee index 358f9d68f..064f1a0df 100644 --- a/script.coffee +++ b/script.coffee @@ -588,8 +588,6 @@ nav = $.append span, prev, $.tn(' '), next $.append d.body, span - nav.threads = $$ 'div.thread' - prev: -> nav.scroll -1 @@ -599,6 +597,7 @@ nav = threads: [] getThread: (full) -> + nav.threads = $$ 'div.thread:not([style])' for thread, i in nav.threads rect = thread.getBoundingClientRect() {bottom} = rect