⭐Append the next page content to the bottom seamlessly (like a waterfall, Unlimited scrolling, no need to manually click on the next page) ⭐, support various forums, social networking, games, comics, novels, academics, search engines (Google, Bing, Yahoo...) and other websites~
"巴哈姆特": { "host": "forum.gamer.com.tw", "url": "/B\\.php\\?/", "iframe": true, "pager": { "type": 6, "nextL": "a.next", "pageE": ".b-list>tbody>tr", "replaceE": ".b-pager.pager", "loadTime": 500, "scrollD": 3000 } }
感謝
复制粘贴到脚本 自定义翻页规则
默认的 { }
中间保存(浏览器右上角 Tampermonkey 扩展图标内的脚本菜单)
"巴哈姆特": {
"host": "forum.gamer.com.tw",
"url": "/^\\/B\\.php/",
"blank": 4,
"pager": {
"nextL": "a.next",
"pageE": ".b-list>tbody>tr:not(.b-list__head)",
"replaceE": ".b-pager"
},
"function": {
"aF": "Forum.B.lazyThumbnail();Forum.Common.drawNoImageCanvas();"
}
}
@倪志華 感谢帮忙写规则,我顺便给优化调整了一下~
翻页模式 6 比较简单省力,不过因为需要后台完整加载网页,所以翻页加载速度有点慢,一般除非必要否则我不会用。
我看了一下,你之所以这么用,应该是为了解决缩略图加载的问题,缩略图问题有脚本内置的 fun.src_bF
函数可以解决(不过还需要删除或 style 来修改 skeleton
Class 样式),不过这个网站有点特殊,除了缩略图片外,对于一些无图的帖子会动态生成默认缩略图,不过我通过分析找到了网站用来加载缩略图的函数,因此直接调用即可。
另外,pageE
建议排除头一列 :not(.b-list__head)
,否则不那么无缝。
规则 "blank": 4,
是用来让帖子链接点击后在新标签页打开,免得影响脚本使用体验(因为打开帖子再后退回去的话,前面翻页累计的网页内容都会没了)。
{
"巴哈姆特-內文": {
"host": "forum.gamer.com.tw",
"url": "/^\\/C\\.php/",
"blank": 4,
"pager": {
"nextL": "a.next",
"pageE": ".c-section[id*='post']",
"replaceE": ".c-section__main.page"
}
}
}
參考你的 寫了一個for 內文的 test url: https://forum.gamer.com.tw/C.php?page=1&bsn=60076&snA=6661814
請求支援 巴哈姆特 e.g. https://forum.gamer.com.tw/B.php?bsn=60076