From 7d4fda2f56a94a277ca799c87bef7eddbfa0c911 Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Mon, 1 Aug 2011 06:38:19 +0200 Subject: [PATCH] Scroll only when you're supposed to. --- 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 6bf688ba0..063b26e9f 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -2731,7 +2731,7 @@ $.bind(form, 'submit', qr.submit); } threading.init(); - if ((id = location.hash.slice(1)) && !$.id(id)) { + if ((id = location.hash.slice(1)) && !$.id(id) && !/\D/.test(id)) { scrollTo(0, d.body.scrollHeight); } if (conf['Auto Noko']) { diff --git a/script.coffee b/script.coffee index fe1afb090..a6d83d699 100644 --- a/script.coffee +++ b/script.coffee @@ -2117,7 +2117,7 @@ main = # scroll to bottom if post isn't found # thumbnail generation takes time - if (id = location.hash[1..]) and !$.id id + if (id = location.hash[1..]) and !$.id(id) and !/\D/.test id scrollTo 0, d.body.scrollHeight if conf['Auto Noko']