aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--nextlink.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/nextlink.js b/nextlink.js
index a76bdf3..b41c3a1 100644
--- a/nextlink.js
+++ b/nextlink.js
@@ -178,6 +178,7 @@ Autopager.prototype = {
}
var curPage = this.getCurrentPage(doc);
+ logger.log(curPage);
var page = (count < 0 ? Math.round : Math.floor)(curPage + count);
if (page <= 1) {
value.isLoading = false;
@@ -304,10 +305,10 @@ Autopager.prototype = {
var curPos = win.scrollY;
// top of page
- if(curPos == 0) return 1.0;
+ if(curPos <= 0) return 1.0;
// bottom of page
- if(curPos == win.scrollMaxY) return 1.5 + makers.length;
+ if(curPos >= win.scrollMaxY) return 1.5 + makers.length;
// return n.5 if between n and n+1
var page = 1.0;