From 959001e880636e4c0dae6ecf64cd2e543e2f9e20 Mon Sep 17 00:00:00 2001 From: hogelog Date: Tue, 20 Jan 2009 03:07:02 +0000 Subject: * 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 --- nextlink.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'nextlink.js') 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; -- cgit v1.2.3