wtf was that p for?

This commit is contained in:
James Campos 2011-04-25 19:15:19 -07:00
parent 6af9e3587c
commit 9dd34853a0
2 changed files with 4 additions and 4 deletions

View File

@ -827,13 +827,13 @@
if (g.PAGENUM === 0) { if (g.PAGENUM === 0) {
window.scrollTo(0, 0); window.scrollTo(0, 0);
} else { } else {
window.location = "" + (g.PAGENUM - 1) + "#p0"; window.location = "" + (g.PAGENUM - 1) + "#0";
} }
return; return;
} }
if (delta === +1) { if (delta === +1) {
if (i === nav.threads.length || (innerHeight + pageYOffset === d.body.scrollHeight)) { if (i === nav.threads.length || (innerHeight + pageYOffset === d.body.scrollHeight)) {
window.location = "" + (g.PAGENUM + 1) + "#p0"; window.location = "" + (g.PAGENUM + 1) + "#0";
return; return;
} }
} }

View File

@ -616,13 +616,13 @@ nav =
if g.PAGENUM is 0 if g.PAGENUM is 0
window.scrollTo 0, 0 window.scrollTo 0, 0
else else
window.location = "#{g.PAGENUM - 1}#p0" window.location = "#{g.PAGENUM - 1}#0"
return return
if delta is +1 if delta is +1
# if we're at the last thread, or we're at the bottom of the page. # if we're at the last thread, or we're at the bottom of the page.
# kind of hackish, what we really need to do is make nav.getThread smarter. # kind of hackish, what we really need to do is make nav.getThread smarter.
if i is nav.threads.length or (innerHeight + pageYOffset == d.body.scrollHeight) if i is nav.threads.length or (innerHeight + pageYOffset == d.body.scrollHeight)
window.location = "#{g.PAGENUM + 1}#p0" window.location = "#{g.PAGENUM + 1}#0"
return return
{top} = nav.threads[i].getBoundingClientRect() {top} = nav.threads[i].getBoundingClientRect()