优化 [部分 WordPress 网站] 通用规则; 新增 [177 漫画] 支持

This commit is contained in:
xiu2
2022-03-12 09:59:48 +08:00
parent 1e8fd931cd
commit 09193757ac
2 changed files with 32 additions and 29 deletions
+16 -12
View File
@@ -3,7 +3,7 @@
// @name:zh-CN 自动无缝翻页
// @name:zh-TW 自動無縫翻頁
// @name:en AutoPager
// @version 5.2.8
// @version 5.2.9
// @author X.I.U
// @description ⭐无缝衔接下一页内容到网页底部(类似瀑布流)⭐,目前支持:【所有「Discuz!、Flarum、phpBB、Xiuno、XenForo、NexusPHP...」论坛】【百度、谷歌(Google)、必应(Bing)、搜狗、微信、360、Yahoo、Yandex 等搜索引擎...】、贴吧、豆瓣、知乎、微博、NGA、V2EX、B 站(Bilibili)、煎蛋网、龙的天空、起点中文、千图网、千库网、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(以上仅一小部分,更多的写不下了...
// @description:zh-TW ⭐無縫銜接下一頁內容到網頁底部(類似瀑布流)⭐,支持各論壇、社交、遊戲、漫畫、小說、學術、搜索引擎(Google、Bing、Yahoo...) 等網站~
@@ -192,11 +192,13 @@
} else if (getCSS('link[href*="themes/begin" i], script[src*="themes/begin" i], img[src*="themes/begin" i]')) {
console.info('[自动无缝翻页] - 使用 WordPress <Begin> 主题的网站'); return 103;
} else if (getCSS('link[href*="/wp-content/" i], script[src*="/wp-content/" i]')) {
if (getCSS('article.post') && getCSS('nav.navigation')) {
if (getCSS('.nav-previous a')) {
console.info('[自动无缝翻页] - 使用 WordPress <nav-previous 旧文章式> 主题的网站'); return 104;
if (getAllCSS('article').length > 2 && getCSS('nav.paging-navigation, nav.pagination')) {
if (getCSS('a.next')) {
console.info('[自动无缝翻页] - 使用 WordPress <a.next 式> 主题的网站'); return 104;
} else if (getCSS('.nav-previous a')) {
console.info('[自动无缝翻页] - 使用 WordPress <nav-previous 旧文章式> 主题的网站'); return 105;
} else if (getXpath('//nav[contains(@class, "navigation")]//a[contains(text(), "下一页") or contains(text(), ">")]')) {
console.info('[自动无缝翻页] - 使用 WordPress <nav-navigation> 下一页式> 主题的网站'); return 105;
console.info('[自动无缝翻页] - 使用 WordPress <nav-navigation> 下一页式> 主题的网站'); return 106;
}
}
} else if ((getCSS('meta[name="description" i][content*="小说"], meta[name="description" i][content*="章节"], meta[name="description" i][content*="阅读"]') || location.hostname.indexOf('biqu') > -1 || document.title.indexOf('笔趣阁') > -1) && getCSS('#content, .content, #chaptercontent, .chaptercontent, #BookText') && getXpath('//a[contains(text(), "下一章") or contains(text(), "下一页")]')) {
@@ -228,9 +230,11 @@
DBSite.dux.url(); delete curSite.function; break;
case 103: // < 所有使用 WordPress Begin 主题的网站 >
DBSite.begin.url(); break;
case 104: // < 所有使用 WordPress nav-previous 旧文章式 主题的网站 >
case 104: // < 所有使用 WordPress a.next 式 主题的网站 >
DBSite.wp_nav_navigation.url(); break;
case 105: // < 所有使用 WordPress nav-navigation 下一页式 主题的网站 >
case 105: // < 所有使用 WordPress nav-previous 旧文章式 主题的网站 >
DBSite.wp_nav_navigation.url('.nav-previous a'); break;
case 106: // < 所有使用 WordPress nav-navigation 下一页式 主题的网站 >
DBSite.wp_nav_navigation.url('//nav[contains(@class, "navigation")]//a[contains(text(), "下一页") or contains(text(), ">")]'); break;
case 200: // < 所有使用 笔趣阁 模板的小说网站 >
DBSite.biquge.url(); break;
@@ -540,12 +544,12 @@ function: {
}
}, // WordPress 的 Begin 主题 - 搜索页
wp_nav_navigation: {
url: function(nextL = '.nav-previous a') {if (!indexOF('/post/') && !getCSS('#comments, .comments-area, #disqus_thread')) {curSite = DBSite.wp_nav_navigation; curSite.pager.nextL = nextL;}},
url: function(nextL = 'a.next') {if (!indexOF('/post/') && !getCSS('#comments, .comments-area, #disqus_thread')) {curSite = DBSite.wp_nav_navigation; curSite.pager.nextL = nextL; if (getCSS('img[data-src]')) {curSite.function = {bF: "return fun.src_bF(pageE, [0, 'img[data-src]', 'data-src'])"};} else if (getCSS('img[data-original]')) {curSite.function = {bF: "return fun.src_bF(pageE, [0, 'img[data-original]', 'data-original'])"};}}},
pager: {
nextL: '.nav-previous a',
pageE: 'article.post',
replaceE: 'nav.navigation',
scrollD: 1500
nextL: 'a.next',
pageE: 'article',
replaceE: 'nav.paging-navigation, nav.pagination',
scrollD: 2000
}
}, // Wordpress 的 nav.navigation 规则
biquge: {
+16 -17
View File
@@ -1794,23 +1794,6 @@
"replaceE": ".pageNav"
}
},
"国外重新包装游戏": {
"host": [
"crackhub.site",
"fitgirl-repacks.site",
"masquerade.site"
],
"style": "html.wp-dark-mode-active .inside-article, #nav-below {background-color: var(--wp-dark-mode-bg);}",
"pager": {
"nextL": "a.next",
"pageE": "article[id^='post-']",
"replaceE": "nav.paging-navigation, nav.pagination",
"scrollD": 2000
},
"function": {
"bF": "return fun.src_bF(pageE, [0, 'img[data-src]', 'data-src'])"
}
},
"茶杯狐": {
"host": "/www\\.cupfox\\./",
"pager": {
@@ -5179,5 +5162,21 @@
"replaceE": ".fenye",
"scrollD": 3500
}
},
"177 漫画/xxiav": {
"host": [
"www.177picyy.com",
"www.xxiav.com"
],
"url": "/\\d+\\.html/",
"pager": {
"nextL": "//div[@class='page-links']/a[./span[./i[@class='be be-arrowright']]]",
"pageE": ".single-content > p",
"replaceE": ".page-links",
"scrollD": 3000
},
"function": {
"bF": "return fun.src_bF(pageE, [0,'img[data-lazy-src]','data-lazy-src'])"
}
}
}