aboutsummaryrefslogtreecommitdiffstats
path: root/nextlink.js
diff options
context:
space:
mode:
authorhogelog2009-01-20 03:07:02 +0000
committerhogelog2009-01-20 03:07:02 +0000
commit959001e880636e4c0dae6ecf64cd2e543e2f9e20 (patch)
tree633d245ce0be1c4898db9c910a2a894291fabc4e /nextlink.js
parentda5a784c17ec578b05fea97b4c83e9911d1df05a (diff)
downloadvimperator-plugins-959001e880636e4c0dae6ecf64cd2e543e2f9e20.tar.bz2
* fix getCurrentPage when scroll page bottom
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@28689 d0d07461-0603-4401-acd4-de1884942a52
Diffstat (limited to 'nextlink.js')
-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;