From 6bd2353d1d266a94396a542f5d8d1da53a95ad3a Mon Sep 17 00:00:00 2001 From: James Campos Date: Sun, 31 Jul 2011 16:36:27 -0700 Subject: [PATCH] scroll to bottom if post isn't found. fixes #202 --- 4chan_x.user.js | 3 +++ script.coffee | 3 +++ 2 files changed, 6 insertions(+) diff --git a/4chan_x.user.js b/4chan_x.user.js index 3b2282ea3..c44ba4257 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -2716,6 +2716,9 @@ Recaptcha.init(); $.bind(form, 'submit', qr.submit); } + if ((id = location.hash.slice(1)) && !$.id(id)) { + scrollTo(0, d.body.scrollHeight); + } threading.init(); if (conf['Auto Noko']) { $('.postarea form').action += '?noko'; diff --git a/script.coffee b/script.coffee index a30e0b394..a7ea1d87a 100644 --- a/script.coffee +++ b/script.coffee @@ -2106,6 +2106,9 @@ main = Recaptcha.init() $.bind form, 'submit', qr.submit + if (id = location.hash[1..]) and !$.id id + scrollTo 0, d.body.scrollHeight + #major features threading.init()