Changeset 28718
- Timestamp:
- 01/20/09 23:49:50 (4 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
lang/javascript/vimperator-plugins/trunk/nextlink.js
r28717 r28718 13 13 <author mail="suvene@zeromemory.info" homepage="http://zeromemory.sblo.jp/">suVene</author> 14 14 <author mail="konbu.komuro@gmail.com" homepage="http://d.hatena.ne.jp/hogelog/">hogelog</author> 15 <version>0.3. 8</version>15 <version>0.3.9</version> 16 16 <license>MIT</license> 17 17 <minVersion>1.2</minVersion> … … 232 232 233 233 var curPage = this.getCurrentPage(doc); 234 logger.log(curPage); 234 235 var page = (count < 0 ? Math.round : Math.floor)(curPage + count); 235 236 if (page <= 1) { … … 360 361 if(curPos <= 0) return 1.0; 361 362 363 // bottom of page 364 if (curPos >= win.scrollMaxY) { 365 if (markers.length > 0) { 366 var lastMarker = $U.getElementPosition(markers[markers.length-1]).top; 367 if (curPos <= lastMarker) return markers.length + 1; 368 } 369 return markers.length + 1.5; 370 } 371 362 372 // return n.5 if between n and n+1 363 373 var page = 1.0; 364 var pos;365 374 for (var i = 0, len = markers.length; i < len; i++) { 366 pos = $U.getElementPosition(markers[i]).top;375 var pos = $U.getElementPosition(markers[i]).top; 367 376 if (curPos == pos) return page + 1; 368 377 if (curPos < pos) return page + 0.5; … … 370 379 } 371 380 372 // bottom of page 373 if (curPos >= win.scrollMaxY && curPos > pos) { 374 return page; 375 } 376 377 return page+0.5; 381 return page + 0.5; 378 382 }, 379 383 getInsertPoint: function(doc, siteinfo) {
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)