新增 [动漫之家 - 日漫 - 分类页] 支持; 优化 [部分 WordPress 网站] 通用规则; 优化 翻页模式5、6 代码

This commit is contained in:
xiu2
2022-04-14 12:16:27 +08:00
parent 2ccf37f005
commit 9d91dc236e
2 changed files with 27 additions and 8 deletions
+14 -7
View File
@@ -3,7 +3,7 @@
// @name:zh-CN 自动无缝翻页
// @name:zh-TW 自動無縫翻頁
// @name:en AutoPager
// @version 5.7.8
// @version 5.7.9
// @author X.I.U
// @description ⭐无缝衔接下一页内容到网页底部(类似瀑布流)⭐,目前支持:【所有「Discuz!、Flarum、phpBB、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(以上仅一小部分,更多的写不下了...
// @description:zh-TW ⭐無縫銜接下一頁內容到網頁底部(類似瀑布流)⭐,支持各論壇、社交、遊戲、漫畫、小說、學術、搜索引擎(Google、Bing、Yahoo...) 等網站~
@@ -426,8 +426,14 @@ function: {
}
}, // 部分自带 自动无缝翻页 的网站
wp_article: {
url: function(nextL) {if (!indexOF('/post/') && !getCSS('#comments, .comments-area, #disqus_thread')) {curSite = DBSite.wp_article; curSite.pager.nextL = nextL;}},
blank: 1,
url: function(nextL) {
if (!indexOF('/post/') && !getCSS('#comments, .comments-area, #disqus_thread')) {
curSite = DBSite.wp_article; curSite.pager.nextL = nextL;
// 自适应瀑布流样式
setTimeout(function(){if (getCSS(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;}');}}, 1000);
}
},
blank: 3,
pager: {
pageE: 'article[class], div[id^="post-"], ul[class*="post"] > li.item',
replaceE: '#nav-below, nav.navigation, nav.paging-navigation, .pagination, .wp-pagenavi, .pagenavi',
@@ -438,7 +444,7 @@ function: {
}
}, // 部分使用 WordPress 的网站
typecho_handsome: {
blank: 1,
blank: 3,
pager: {
nextL: 'li.next > a',
pageE: '.blog-post, .post-list',
@@ -2304,7 +2310,7 @@ function: {
let iframe = document.createElement('iframe');
iframe.style = 'position: absolute !important; width: 100% !important; height: 100% !important; border: none !important;';
iframe.id = 'Autopage_iframe';
iframe.src = src;
iframe.src = src.replace(/#.+$/,'');
var beforeScrollTop = document.documentElement.scrollTop || document.body.scrollTop
// 当滚动条到底部时(即完全显示 iframe 框架),隐藏当前页面的滚动条
@@ -2368,6 +2374,7 @@ function: {
// 暂停翻页
if (!pausePage) return
pausePage = false
//console.log(src)
// 如果不存在,则创建一个 iframe
let iframe = document.getElementById('Autopage_iframe');
@@ -2376,7 +2383,7 @@ function: {
iframe.style = 'position: absolute !important; top: -9999px !important; left: -9999px !important; width: 100% !important; height: 100% !important; border: none !important; z-index: -999 !important; /*visibility: hidden;*/';
//iframe.sandbox = 'allow-same-origin allow-scripts allow-popups allow-forms';
iframe.id = 'Autopage_iframe';
iframe.src = src;
iframe.src = src.replace(/#.+$/,'');
}
// 加载完成后才继续
@@ -2396,7 +2403,7 @@ function: {
// 插入 iframe(如果已存在则直接改 src)
if (document.getElementById('Autopage_iframe')) {
iframe.src = src;
iframe.src = src.replace(/#.+$/,'');
} else {
document.documentElement.appendChild(iframe);
}
+13 -1
View File
@@ -357,7 +357,7 @@
"url": "return ((fun.indexOF(/^\\/people\\/.+\\/status/) && (!fun.indexOF('tab=','s') || fun.indexOF('tab=comment','s'))) || (fun.indexOF(/^\\/note\\/\\d+\\//) && !fun.indexOF('type=','s')) || fun.indexOF(/^\\/review\\/\\d+\\//))",
"pager": {
"type": 6,
"nextL": "js; let a=fun.getCSS('a.next');if(a && a.href){return a.href.replace(/#.+$/,'')}",
"nextL": "a.next",
"pageE": ".comment-list-wrapper",
"replaceE": ".paginator",
"loadTime": 1000
@@ -2875,6 +2875,18 @@
"aF": "let _img = ''; for (let i=0;i<arr_pages.length;i++){_img += `<img src=\"${img_prefix}${arr_pages[i]}\">`;}; fun.getCSS('#center_box').insertAdjacentHTML('beforeend', _img);"
}
},
"动漫之家 - 日漫 - 分类页": {
"host": "manhua.dmzj.com",
"url": "/^\\/tags/",
"pager": {
"type": 6,
"forceHTTPS": true,
"nextL": "a.pselected+a",
"pageE": "#search_list_div>ul",
"replaceE": ".pages",
"loadTime": 800
}
},
"动漫之家 - 日漫 - 最近更新": {
"host": "manhua.dmzj.com",
"url": "/^\\/update/",