test string before dom

This commit is contained in:
James Campos 2011-07-31 22:00:56 -07:00
parent 0ef3248f81
commit 291f43bb25
2 changed files with 2 additions and 2 deletions

View File

@ -2743,7 +2743,7 @@
$.bind(form, 'submit', qr.submit);
}
threading.init();
if ((id = location.hash.slice(1)) && !$.id(id) && !/\D/.test(id)) {
if ((id = location.hash.slice(1)) && /\d/.test(id[0]) && !$.id(id)) {
scrollTo(0, d.body.scrollHeight);
}
if (conf['Auto Noko']) {

View File

@ -2128,7 +2128,7 @@ main =
# scroll to bottom if post isn't found
# thumbnail generation takes time
if (id = location.hash[1..]) and !$.id(id) and !/\D/.test id
if (id = location.hash[1..]) and /\d/.test(id[0]) and !$.id(id)
scrollTo 0, d.body.scrollHeight
if conf['Auto Noko']