Skip to content

Commit 28c00dd

Browse files
committed
优化 [部分 WordPress 网站] 通用规则
1 parent b539206 commit 28c00dd

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

Autopage.user.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// @name:zh-CN 自动无缝翻页
44
// @name:zh-TW 自動無縫翻頁
55
// @name:ru Автостраничник
6-
// @version 6.6.74
6+
// @version 6.6.75
77
// @author X.I.U
88
// @description ⭐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~
99
// @description:zh-CN ⭐无缝加载 下一页内容 至网页底部(类似瀑布流,无限滚动,无需手动点击下一页)⭐,目前支持:【所有「Discuz!、Flarum、phpBB、MyBB、Xiuno、XenForo、NexusPHP...」论坛】【百度、谷歌(Google)、必应(Bing)、搜狗、微信、360、Yahoo、Yandex 等搜索引擎...】、贴吧、豆瓣、知乎、NGA、V2EX、起点中文、千图网、千库网、Pixabay、Pixiv、3DM、游侠网、游民星空、NexusMods、Steam 创意工坊、CS.RIN.RU、RuTracker、BT之家、萌番组、动漫花园、樱花动漫、爱恋动漫、AGE 动漫、Nyaa、SrkBT、RARBG、SubHD、423Down、不死鸟、扩展迷、小众软件、【动漫狂、动漫屋、漫画猫、漫画屋、漫画 DB、HiComic、Mangabz、Xmanhua 等漫画网站...】、PubMed、Z-Library、GreasyFork、Github、StackOverflow(以上仅一小部分常见网站,更多的写不下了...
@@ -327,7 +327,9 @@
327327
}
328328

329329

330-
if (getCSS('a.next, a.next-page')) {
330+
if (getCSS('a.next.page-numbers, a.next-page.page-numbers')) {
331+
DBSite.wp_article.pager.nextL = 'a.next.page-numbers, a.next-page.page-numbers'
332+
} else if (getCSS('a.next, a.next-page')) {
331333
DBSite.wp_article.pager.nextL = 'a.next, a.next-page'
332334
} else if (getCSS('a[rel="next" i], a[aria-label="next" i], a[aria-label="下一个"].page-link, a[aria-label="Next Page" i], a[aria-label="下一页"], a[rel="下一页"], a[title="下一页"], a[aria-label="下一頁"], a[rel="下一頁"], a[title="下一頁"]')) {
333335
DBSite.wp_article.pager.nextL = 'a[rel="next" i], a[aria-label="next" i], a[aria-label="下一个"].page-link, a[aria-label="Next Page" i], a[aria-label="下一页"], a[rel="下一页"], a[title="下一页"], a[aria-label="下一頁"], a[rel="下一頁"], a[title="下一頁"]'
@@ -565,6 +567,9 @@ function: {
565567
url: ()=> {
566568
if (!indexOF('/post/') && !getCSS('#comments, .comments-area, #disqus_thread')) {
567569
curSite = DBSite.wp_article;
570+
if (!getCSS(DBSite.wp_article.pager.replaceE)){ // 如果没找到常见的页码父元素,则删除 replaceE 让脚本自行判断
571+
delete curSite.pager.replaceE
572+
}
568573
// 自适应瀑布流样式
569574
setTimeout(()=>{if (getOne(curSite.pager.pageE).style.cssText.indexOf('position: absolute') != -1){insStyle(curSite.pager.pageE + '{position: static !important; float: left !important; height: '+ parseInt(getCSS(curSite.pager.pageE).offsetHeight * 1.1) + 'px !important;}');}}, 1500);
570575
}

0 commit comments

Comments
 (0)