mirror of
https://github.com/internetarchive/brozzler.git
synced 2025-04-20 23:56:34 -04:00
prioritize scrolling down
This commit is contained in:
parent
ef70907040
commit
9001449c70
@ -129,12 +129,12 @@ class UmbraBehavior {
|
||||
}
|
||||
|
||||
if (!didSomething) {
|
||||
if (somethingLeftAbove) {
|
||||
window.scrollBy(0, -500);
|
||||
this.idleSince = null;
|
||||
} else if (somethingLeftBelow || ( (window.scrollY + window.innerHeight) < document.documentElement.scrollHeight)) {
|
||||
if (somethingLeftBelow || ( (window.scrollY + window.innerHeight) < document.documentElement.scrollHeight)) {
|
||||
window.scrollBy(0, 200);
|
||||
this.idleSince = null;
|
||||
} else if (somethingLeftAbove) {
|
||||
window.scrollBy(0, -500);
|
||||
this.idleSince = null;
|
||||
} else if (this.idleSince == null) {
|
||||
this.idleSince = Date.now();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user