Super Next Page

By godeye Last update Jan 2, 2012 — Installed 19,476 times.

Script Summary: 找出帖子中的上一页/下一页链接并高亮显示,使用左右键进行翻页. 网页滚动至一半处时,预读下一页网页,加快网页加载速度 可设置标题栏/链接/图标状态显示 Automaticly prefetchs next page link .Use the arrow keys to flip around, → for Next page, ← for Previous page.Supports most chinese and english website.



Version: 0.2.4

Thumb Thumb

介绍 Introduction

功能 Features
  • 自动分析出网页中的上一页/下一页链接.
    Determine previous / next page links automatically.
  • 当网页滚动至约一半高度时,预读下一页的网页内容,包括网页文本及图片等.
    When the page scroll to about half height, prefetch the next page page content, including text, image and other object
  • 缓存完毕时下一页链接高亮显示,右上方图标提示更新.
    When finished prefetching,hilight next page links and top right icon will be updated
  • 当点击缓存完毕的链接时,即时加载下一页,无需从服务器下载任何数据.
    When you click the next page link,loading page content immediately,no need to download data from server.
  • 支持键盘左右键上下翻页,配合扩展firegestures实现鼠标翻页.
    You can use the arrow keys to paging,you can also use mouse gesture with firegestures.
  • 支持前进后退按钮,默认最多10项.
    Support go back /forward buttons with maximum of 10 histories
网页预读采用Iframe实现,预读完成后相应链接,右上方图标及标题栏会有提示
点击相应链接或按向右键即时动态加载下一页,尤其适合网速较慢或图片较多的场合使用.

说明 Description
颜色说明:
绿(on)缓存开启
灰(off)缓存关闭
黄(loading)正在缓存下一页文本,此时点击下一页起不到预读作用
蓝(textdone)下一页文本已缓存,正在缓存图片等,此时点击下一页可起到部分预读作用.
深绿(not_found)未找到下一页链接
粉红(error)缓存出错.
点击右上角图标on/off可关闭缓存功能,此时翻页功能仍开启

缓存功能不支持加载时重定向的网页.例如:www.baidu.com
由于js的限制,此问题基本无法解决.
若遇到显示错误网页,请关闭缓存功能
或将此网站加入GreaseMonkey例外

如需关闭某项功能,请修改源文件参数设置部分,内有注释.

自定义翻页链接关键词:
在 工具 --> greasemonkey --> 用户脚本命令里,关键词之间用“,”或“,”分隔开,允许使用正则表达式.在关键词前面可以添加域名或网址(以花括弧“{}”括起来,可以包含通配符“*”,不同网址使用相同的关键词,可以用“|”分隔网址)匹配特定网址.
如使用 older, a\s+b,{*.readnovel.com}\S*下一页,{ww.xxxxx.com|*.yyyyy.cn}older page 等作为关键词。

建议配合鼠标手势更方便:

firegestures 的自定义手势脚本(注意:手势起点必须在要翻页的页或帧里):
Firegestures scripts:

下一页代码
Script for next page
try { var node = FireGestures.sourceNode; } catch (e) {}
while (node && node.nodeName != "BODY")
node = node.parentNode;
if (!node) node = getBrowser().contentDocument;
var e = document.createEvent("KeyboardEvent");
e.initKeyEvent("keydown", true, true, window, false, false, false, false, 39, 0);
node.dispatchEvent(e);

上一页代码
Script for previous page
try { var node = FireGestures.sourceNode; } catch (e) {}
while (node && node.nodeName != "BODY")
node = node.parentNode;
if (!node) node = getBrowser().contentDocument;
var e = document.createEvent("KeyboardEvent");
e.initKeyEvent("keydown", true, true, window, false, false, false, false, 37, 0);
node.dispatchEvent(e);

更新 Updates



Ver0.2.4 @ 2012-01-02 更新:
增加了对链接rel属性的检测, thanks to kraml
修正了遇到没有子元素的链接时脚本出错的问题

Ver0.2.3 @ 2010-08-03 更新:
修正光标在文本框时左右键翻页问题, thanks to conpin

Ver0.2.2 @ 2009-5-22 更新:
原0.1.5存在bug,请更新到0.2.2

解决了前进后退的问题
默认最大历史记录项10个

Ver0.1.5 @ 2009-5-20 更新:
解决了使用预读后,后退按钮失效的问题

Ver0.1.1 @ 2008-12-5 更新:
修改了页面刷新错误的BUG,增加了英语提示等
目前存在的BUG:
1.访问百度会出现自动刷新情况,可能由网页BODY的onload='document.f1.reset();'导致,建议加入例外.
2.对于天涯类使用框架的bbs不支持,若要支持注释掉第一行if (window != top) return; 即可,但可能形成嵌套的循环


补充 Remark

本脚代码基于Autopagerize,Next Page,Prefetch Next Page大部分代码
在此感谢原作者的贡献.
Mailto:
ntdrv_1 (at) 126 (dot) com

参考 Reference


Next Page:http://userscripts.org/scripts/show/27251
Prefetch Next Page:http://userscripts.org/scripts/show/34865
Autopagerize:http://d.hatena.ne.jp/swdyh/