From 420a5ad4326ddc034207cd35e5cd1074519a3c10 Mon Sep 17 00:00:00 2001 From: Zixaphir Date: Tue, 7 Jan 2014 10:20:13 -0700 Subject: [PATCH] Why bother assigning variables to do nothing with them? --- builds/4chan-X.user.js | 4 ++-- builds/crx/script.js | 4 ++-- src/Quotelinks/QuoteThreading.coffee | 7 ++++--- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index ffff9a1c3..981476491 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -4981,11 +4981,11 @@ nodeinsert: function(force) { var bottom, height, post, posts, root, threadContainer, top, _ref; post = g.posts[this.threaded]; - posts = Unread.posts; - root = post.nodes.root; if (this.thread.OP === post) { return false; } + posts = Unread.posts; + root = post.nodes.root; if (!force) { height = doc.clientHeight; _ref = root.getBoundingClientRect(), bottom = _ref.bottom, top = _ref.top; diff --git a/builds/crx/script.js b/builds/crx/script.js index c793ecef5..72b8554bc 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -4984,11 +4984,11 @@ nodeinsert: function(force) { var bottom, height, post, posts, root, threadContainer, top, _ref; post = g.posts[this.threaded]; - posts = Unread.posts; - root = post.nodes.root; if (this.thread.OP === post) { return false; } + posts = Unread.posts; + root = post.nodes.root; if (!force) { height = doc.clientHeight; _ref = root.getBoundingClientRect(), bottom = _ref.bottom, top = _ref.top; diff --git a/src/Quotelinks/QuoteThreading.coffee b/src/Quotelinks/QuoteThreading.coffee index b50cbe94c..25ab3f325 100755 --- a/src/Quotelinks/QuoteThreading.coffee +++ b/src/Quotelinks/QuoteThreading.coffee @@ -49,12 +49,13 @@ QuoteThreading = @cb = QuoteThreading.nodeinsert nodeinsert: (force) -> - post = g.posts[@threaded] - {posts} = Unread - {root} = post.nodes + post = g.posts[@threaded] return false if @thread.OP is post + {posts} = Unread + {root} = post.nodes + unless force height = doc.clientHeight {bottom, top} = root.getBoundingClientRect()