@page bottom, next thread -> next page
This commit is contained in:
parent
4198365ab4
commit
dfed85d6d1
@ -827,9 +827,11 @@
|
|||||||
window.scrollTo(0, 0);
|
window.scrollTo(0, 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (i === nav.threads.length) {
|
if (delta === +1) {
|
||||||
window.location = "" + (g.PAGENUM + 1) + "#p0";
|
if (i === nav.threads.length || (innerHeight + pageYOffset === d.body.scrollHeight)) {
|
||||||
return;
|
window.location = "" + (g.PAGENUM + 1) + "#p0";
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
top = nav.threads[i].getBoundingClientRect().top;
|
top = nav.threads[i].getBoundingClientRect().top;
|
||||||
return window.scrollBy(0, top);
|
return window.scrollBy(0, top);
|
||||||
|
|||||||
@ -615,9 +615,12 @@ nav =
|
|||||||
if i is -1
|
if i is -1
|
||||||
window.scrollTo 0, 0
|
window.scrollTo 0, 0
|
||||||
return
|
return
|
||||||
if i is nav.threads.length
|
if delta is +1
|
||||||
window.location = "#{g.PAGENUM + 1}#p0"
|
# if we're at the last thread, or we're at the bottom of the page.
|
||||||
return
|
# 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)
|
||||||
|
window.location = "#{g.PAGENUM + 1}#p0"
|
||||||
|
return
|
||||||
|
|
||||||
{top} = nav.threads[i].getBoundingClientRect()
|
{top} = nav.threads[i].getBoundingClientRect()
|
||||||
window.scrollBy 0, top
|
window.scrollBy 0, top
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user