diff --git a/.github/ISSUE_TEMPLATE/01-bugReport.yml b/.github/ISSUE_TEMPLATE/01-bugReport.yml index e186d4c15..c1d19151e 100644 --- a/.github/ISSUE_TEMPLATE/01-bugReport.yml +++ b/.github/ISSUE_TEMPLATE/01-bugReport.yml @@ -6,8 +6,9 @@ body: - type: markdown attributes: value: | - 发之前,请先搜下有没有类似的 [Issues](https://github.com/XIU2/UserScript/issues) 问题(包括[关闭](https://github.com/XIU2/UserScript/issues?q=is%3Aissue+is%3Aclosed)的),请勿重复发起! - 注意,**不接受**与其他脚本/扩展 `功能冲突` 的相关问题反馈(原因见 [#146](https://github.com/XIU2/UserScript/issues/146))! + 发之前,请先搜下有没有类似的 [**Issues**](https://github.com/XIU2/UserScript/issues) 问题(包括[**关闭**](https://github.com/XIU2/UserScript/issues?q=is%3Aissue+is%3Aclosed)的),请勿重复发起! + > [!NOTE] + > 注意!**不接受**与其他脚本/扩展 `功能冲突` 的相关问题反馈(原因见 [#146](https://github.com/XIU2/UserScript/issues/146))! **** - type: textarea id: description diff --git a/.github/ISSUE_TEMPLATE/02-featureRequest.yml b/.github/ISSUE_TEMPLATE/02-featureRequest.yml index 92a771493..c1774c1b6 100644 --- a/.github/ISSUE_TEMPLATE/02-featureRequest.yml +++ b/.github/ISSUE_TEMPLATE/02-featureRequest.yml @@ -6,14 +6,16 @@ body: - type: markdown attributes: value: | - ***注意:本项目已不再接受任何【新脚本请求】!*** + > [!NOTE] + > ***注意:本项目已不再接受任何【新脚本请求】!*** **** - 发之前,请先搜下有没有类似的 [Issues](https://github.com/XIU2/UserScript/issues) (包括[关闭](https://github.com/XIU2/UserScript/issues?q=is%3Aissue+is%3Aclosed)的),请勿重复发起! - 注意,**不接受**与其他脚本/扩展 `功能冲突` 的相关问题反馈(原因见 [#146](https://github.com/XIU2/UserScript/issues/146))! + 发之前,请先搜下有没有类似的 [**Issues**](https://github.com/XIU2/UserScript/issues) (包括[**关闭**](https://github.com/XIU2/UserScript/issues?q=is%3Aissue+is%3Aclosed)的),请勿重复发起! + + > [!NOTE] + > 注意!**不接受**与其他脚本/扩展 `功能冲突` 的相关问题反馈(原因见 [#146](https://github.com/XIU2/UserScript/issues/146))! + 另外,无论添加修改什么功能,都需要消耗大量时间与精力,因此请确保该功能建议是大家都需要的,而不是只为了满足个人小众需求! **** - 如果是希望 `[自动无缝翻页]` 脚本添加某个网站的支持,那么就在下面 `功能需求` 处写上具体到要添加支持的网页 URL 地址(而不是只写个首页地址),并在 `预期目标` 中简单介绍该网站。因为精力有限,目前主要维护现有规则,因此是否添加支持则看 网站类型 与 个人兴趣,不再全盘接受了~ - **** - type: textarea id: description attributes: diff --git a/.github/ISSUE_TEMPLATE/03-autoPageRequest.yml b/.github/ISSUE_TEMPLATE/03-autoPageRequest.yml new file mode 100644 index 000000000..e27a94a98 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/03-autoPageRequest.yml @@ -0,0 +1,40 @@ +name: 自动无缝翻页 - 申请添加支持 (Autopage request) +description: 自动无缝翻页 脚本 申请添加支持 xxx 网站... +title: "[自动无缝翻页] 申请添加支持 xxx 网站(记得修改该标题示例,并移除该括号提示)" +labels: 功能建议 +body: + - type: markdown + attributes: + value: | + > [!NOTE] + > ***注意:因为精力有限,目前主要维护现有规则,想要让我花费时间和精力帮你写规则,就请务必看完以下 `申请必读` !*** + **** + 发之前,请先搜下有没有类似的 [**Issues**](https://github.com/XIU2/UserScript/issues) (包括[**关闭**](https://github.com/XIU2/UserScript/issues?q=is%3Aissue+is%3Aclosed)的),请勿重复发起! + + > [!IMPORTANT] + > ### \# 申请必读: + > 1. 请先确认 **`不是动态加载内容`** 的网站(**鼠标指向页码,左下角不显示链接即代表是动态加载**),这类网站无法制作规则。 + > 2. 如 **`需要登录`** 才能看到内容(无论注册有多简单),请**告诉我账号**,否则我**无法凭空制作**翻页规则(网课类不会支持)。 + > 3. 请提供希望添加支持的 **`可翻页(含有页码)的具体网页地址`** 以供我编写规则(特别是**页面很多的网站**),尽量减少我的工作量,否则可能拒绝。 + > 4. 对于 **`正版小说/漫画`** 网站,因为**反爬防盗**的原因也会导致无法制作规则(该脚本本质上也是爬虫,虽然只爬取下一页,但也会被阻碍)。 + > 5. 对于 **`没有 HTTPS`** 的网站(这种网站目前全网占比极少,且大都是一些老旧网站),是不考虑添加支持的。 + > 6. 如果你要申请对 `某个博客/论坛系统` 添加支持(即通用规则,所有使用这个博客/论坛系统的网站都会支持),那么需要提供 `官方博客/论坛地址` 及 其他**几个使用该博客/论坛系统的网站地址**,用于对比、验证,才能写出通用规则。 + + > - 对于需要登录才能看的网页,哪怕注册再简单我也不会去主动注册,你可以用一些 **`阅后即焚`** 的网站来告诉我你的账号密码(毕竟 Github 没有私信功能,你可以提前把密码改成别的,我用完了你再改回去),也可以用各种 **`在线临时邮箱`** 网站随便申请个账号给我用,但不管如何你必须提供一个账号给我才能编写规则,这是基本原则。 + **** + - type: input + id: websitename + attributes: + label: 申请添加支持的 网站名称 + description: 必填,网站名字叫什么?方便我一眼识别网站类型 + placeholder: 请输入... + validations: + required: true + - type: textarea + id: webaddress + attributes: + label: 申请添加支持的 网页地址 + description: 必填,请提供要添加自动翻页支持的 **`具体网页地址 URL`**(各类希望添加支持的页面地址都要写上,如首页、分类页、搜索页、阅读页什么的),***请勿只提供一个网站首页地址***(除非你只需要对 首页 添加支持),否则可能会直接拒绝申请。 + placeholder: https://xxx + validations: + required: true \ No newline at end of file diff --git a/52pojie-Enhanced.user.js b/52pojie-Enhanced.user.js index 412792cef..12042c47c 100644 --- a/52pojie-Enhanced.user.js +++ b/52pojie-Enhanced.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 吾爱破解论坛增强 - 自动签到、翻页 -// @version 1.3.6 +// @version 1.3.7 // @author X.I.U // @description 自动签到、自动无缝翻页、屏蔽导读悬赏贴(最新发表页) // @match *://www.52pojie.cn/* @@ -306,6 +306,7 @@ GM_xmlhttpRequest({ url: url, method: "GET", + overrideMimeType: 'text/html; charset=' + (document.characterSet||document.charset||document.inputEncoding), timeout: 5000, onload: function (response) { try { diff --git a/Autopage.user.js b/Autopage.user.js index b157f8ab6..7062dbdb2 100644 --- a/Autopage.user.js +++ b/Autopage.user.js @@ -1,31 +1,36 @@ // ==UserScript== -// @name 自动无缝翻页 +// @name AutoPager // @name:zh-CN 自动无缝翻页 // @name:zh-TW 自動無縫翻頁 -// @name:en AutoPager -// @version 6.5.10 +// @name:ru Автостраничник +// @version 6.6.75 // @author X.I.U -// @description ⭐无缝加载 下一页内容 至网页底部(类似瀑布流)⭐,目前支持:【所有「Discuz!、Flarum、phpBB、Xiuno、XenForo、NexusPHP...」论坛】【百度、谷歌(Google)、必应(Bing)、搜狗、微信、360、Yahoo、Yandex 等搜索引擎...】、贴吧、豆瓣、知乎、B 站(bilibili)、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...) 等網站~ -// @description:en Append the next page content to the bottom seamlessly (like a waterfall)~ +// @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~ +// @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(以上仅一小部分常见网站,更多的写不下了... +// @description:zh-TW ⭐無縫加載 下一頁內容 至網頁底部(類似瀑布流,无限滚动,無需手働點擊下一頁)⭐,支持各論壇、社交、遊戲、漫畫、小說、學術、搜索引擎(Google、Bing、Yahoo...) 等網站~ +// @description:ru ⭐Плавно добавляет содержимое следующей страницы к нижней части (как водопад, неограниченная прокрутка, не нужно вручную нажимать на следующую страницу) ⭐, поддерживает различные форумы, соцсети, игры, комиксы, романы, научные статьи, поисковики (Google, Bing, Yahoo...) и другие сайты~ // @match *://*/* // @connect userscript.xiu2.xyz // @connect userscript.h233.eu.org // @connect bitbucket.org -// @connect gitea.com -// @connect js.cdn.haah.net -// @connect jsdelivr.b-cdn.net -// @connect raw.fgit.cf -// @connect raw.cithub.icu -// @connect raw.njuu.cf -// @connect ghproxy.net -// @connect ghproxy.com -// @connect gh-proxy.com -// @connect github.moeyy.xyz // @connect jsd.onmicrosoft.cn -// @connect cdn.jsdelivr.ren +// @connect wget.la +// @connect ghfast.top +// @connect ghproxy.cfd +// @connect raw.dgithub.xyz +// @connect ghproxy.net +// @connect cdn.jsdmirror.com +// @connect js.cdn.haah.net +// @connect raw.kkgithub.com // @connect gcore.jsdelivr.net // @connect fastly.jsdelivr.net +// @connect jsd.proxy.aks.moe +// @connect jsdelivr.pai233.top +// @connect gh-proxy.org +// @connect hk.gh-proxy.org +// @connect hub.glowp.xyz +// @connect g.blfrp.cn +// @connect gh.catmak.name // @connect www.xuexiniu.com // @connect bbs.xuexiniu.com // @connect weili.ooopic.com @@ -85,52 +90,53 @@ (function() { 'use strict'; + let urlArr = [ // 外置翻页规则更新地址分流,以确保更新成功率(记得 connect) + 'https://cdn.jsdmirror.com/gh/XIU2/UserScript/other/Autopage/rules.json', + //'https://js.cdn.haah.net/gh/XIU2/UserScript/other/Autopage/rules.json', // 证书过期 + //'https://raw.kkgithub.com/XIU2/UserScript/master/other/Autopage/rules.json', // 超时 + //'https://gcore.jsdelivr.net/gh/XIU2/UserScript/other/Autopage/rules.json', + 'https://fastly.jsdelivr.net/gh/XIU2/UserScript/other/Autopage/rules.json', + //'https://jsd.proxy.aks.moe/gh/XIU2/UserScript/other/Autopage/rules.json', + //'https://jsdelivr.pai233.top/gh/XIU2/UserScript/other/Autopage/rules.json', + 'https://hub.glowp.xyz/https://raw.githubusercontent.com/XIU2/UserScript/master/other/Autopage/rules.json', + 'https://g.blfrp.cn/https://raw.githubusercontent.com/XIU2/UserScript/master/other/Autopage/rules.json', + 'https://gh.catmak.name/https://raw.githubusercontent.com/XIU2/UserScript/master/other/Autopage/rules.json', + 'https://gh-proxy.org/https://raw.githubusercontent.com/XIU2/UserScript/master/other/Autopage/rules.json', + 'https://hk.gh-proxy.org/https://raw.githubusercontent.com/XIU2/UserScript/master/other/Autopage/rules.json', + ] + const urlArr2 = [ + 'https://userscript.h233.eu.org/other/Autopage/rules.json', + 'https://userscript.xiu2.xyz/other/Autopage/rules.json', + 'https://bitbucket.org/xiu2/userscript/raw/master/other/Autopage/rules.json', + 'https://jsd.onmicrosoft.cn/gh/XIU2/UserScript/other/Autopage/rules.json', + 'https://wget.la/https://raw.githubusercontent.com/XIU2/UserScript/master/other/Autopage/rules.json', + 'https://ghfast.top/https://raw.githubusercontent.com/XIU2/UserScript/master/other/Autopage/rules.json', + //'https://ghproxy.cfd/https://raw.githubusercontent.com/XIU2/UserScript/master/other/Autopage/rules.json', // 超时 + //'https://raw.dgithub.xyz/XIU2/UserScript/master/other/Autopage/rules.json', // 证书挂了 + //'https://ghproxy.net/https://raw.githubusercontent.com/XIU2/UserScript/master/other/Autopage/rules.json', // 挂了 + ], + loadMoreExclude1 = ['.smzdm.com','stackoverflow.com'], + loadMoreExclude2 = ['.steampowered.com','.zcool.com.cn']; + var menuAll = [ ['menu_disable', '✅ 已启用 (点击对当前网站禁用)', '❌ 已禁用 (点击对当前网站启用)', []], ['menu_thread', '帖子内自动翻页 (社区类网站)', '帖子内自动翻页 (社区类网站)', true], ['menu_page_number', '显示当前页码及点击暂停翻页', '显示当前页码及点击暂停翻页', true], ['menu_pause_page', '左键双击网页空白处暂停翻页', '左键双击网页空白处暂停翻页', false], ['menu_history', '添加历史记录+修改地址/标题', '添加历史记录+修改地址/标题', true], - ['menu_rules', '更新外置翻页规则 (每天自动)', '更新外置翻页规则 (每天自动)', {}], + ['menu_rules', '更新外置翻页规则 (定期自动)', '更新外置翻页规则 (定期自动)', {}], ['menu_customRules', '自定义翻页规则', '自定义翻页规则', {}] - ], urlArr = [ // 外置翻页规则更新地址分流,以确保更新成功率(记得 connect) - 'https://userscript.h233.eu.org/other/Autopage/rules.json', - 'https://bitbucket.org/xiu2/userscript/raw/master/other/Autopage/rules.json', - 'https://gitea.com/XIU2/UserScript/raw/branch/master/other/Autopage/rules.json', - 'https://raw.fgit.cf/XIU2/UserScript/master/other/Autopage/rules.json', - //'https://raw.cithub.icu/XIU2/UserScript/master/other/Autopage/rules.json', - 'https://raw.njuu.cf/XIU2/UserScript/master/other/Autopage/rules.json', - 'https://ghproxy.net/https://raw.githubusercontent.com/XIU2/UserScript/master/other/Autopage/rules.json', - 'https://ghproxy.com/https://raw.githubusercontent.com/XIU2/UserScript/master/other/Autopage/rules.json', - 'https://gh-proxy.com/https://raw.githubusercontent.com/XIU2/UserScript/master/other/Autopage/rules.json', - 'https://github.moeyy.xyz/https://raw.githubusercontent.com/XIU2/UserScript/master/other/Autopage/rules.json', - //'https://cdn.jsdelivr.ren/gh/XIU2/UserScript/other/Autopage/rules.json', - 'https://jsd.onmicrosoft.cn/gh/XIU2/UserScript/other/Autopage/rules.json', - //'https://gcore.jsdelivr.net/gh/XIU2/UserScript/other/Autopage/rules.json', - 'https://fastly.jsdelivr.net/gh/XIU2/UserScript/other/Autopage/rules.json', - 'https://jsdelivr.b-cdn.net/gh/XIU2/UserScript/other/Autopage/rules.json', - 'https://js.cdn.haah.net/gh/XIU2/UserScript/other/Autopage/rules.json' - ], urlArr2 = [ - 'https://userscript.h233.eu.org/other/Autopage/rules.json', - 'https://userscript.xiu2.xyz/other/Autopage/rules.json', - 'https://bitbucket.org/xiu2/userscript/raw/master/other/Autopage/rules.json', - 'https://gitea.com/XIU2/UserScript/raw/branch/master/other/Autopage/rules.json', - 'https://raw.fgit.cf/XIU2/UserScript/master/other/Autopage/rules.json', - //'https://raw.cithub.icu/XIU2/UserScript/master/other/Autopage/rules.json', - 'https://raw.njuu.cf/XIU2/UserScript/master/other/Autopage/rules.json', - 'https://ghproxy.net/https://raw.githubusercontent.com/XIU2/UserScript/master/other/Autopage/rules.json', - 'https://ghproxy.com/https://raw.githubusercontent.com/XIU2/UserScript/master/other/Autopage/rules.json', - 'https://gh-proxy.com/https://raw.githubusercontent.com/XIU2/UserScript/master/other/Autopage/rules.json', - 'https://github.moeyy.xyz/https://raw.githubusercontent.com/XIU2/UserScript/master/other/Autopage/rules.json' - ], - loadMoreExclude1 = ['.smzdm.com','stackoverflow.com'], - loadMoreExclude2 = ['.steampowered.com','.zcool.com.cn'], - menuId = [], webType = 0, curSite = {SiteTypeID: 0}, DBSite, DBSite2, pausePage = true, pageNum = {now: 1, _now: 1}, urlC = false, nowLocation = '', lp = location.pathname, scriptHandler; - window.autoPage = {lp: ()=>location.pathname, indexOF: indexOF, isMobile: isMobile, isUrlC: isUrlC, blank: forceTarget, getAll: getAll, getOne: getOne, getAllXpath: getAllXpath, getXpath: getXpath, getAllCSS: getAllCSS, getCSS: getCSS, getNextE: getNextE, getNextEP: getNextEP, getNextSP: getNextSP, getNextEPN: getNextEPN, getNextUPN: getNextUPN, getNextUP: getNextUP, getNextF: getNextF, getSearch: getSearch, getCookie: getCookie, insStyle: insStyle, insScript: insScript, src_bF: src_bF, xs_bF: xs_bF} + ], menuId = [], webType = 0, curSite = {SiteTypeID: 0}, DBSite, DBSite2, DBSiteNow, pausePage = true, pageNum = {now: 1, _now: 1}, urlC = false, nowLocation = '', lp = location.pathname, scriptHandler; + urlArr.push(...urlArr2); // 合并数组 + window.autoPage = {lp: ()=>location.pathname, indexOF: indexOF, isMobile: isMobile, isUrlC: isUrlC, isPager: isPager, isTitle: isTitle, blank: forceTarget, getAll: getAll, getOne: getOne, getAllXpath: getAllXpath, getXpath: getXpath, getAllCSS: getAllCSS, getCSS: getCSS, getNextE: getNextE, getNextEP: getNextEP, getNextSP: getNextSP, getNextEPN: getNextEPN, getNextUPN: getNextUPN, getNextUP: getNextUP, getNextF: getNextF, getSearch: getSearch, getCookie: getCookie, insStyle: insStyle, insScript: insScript, cleanuEvent: cleanuEvent, src_bF: src_bF, xs_bF: xs_bF, pageNumIncrement: pageNumIncrement} if (typeof GM_info != 'undefined') {scriptHandler = GM_info.scriptHandler;} else if (typeof GM != 'undefined' && typeof GM.info != 'undefined') {scriptHandler = GM.info.scriptHandler;} else {scriptHandler = '';} for (let i=0;i 论坛`); return 6; + } else if (typeof MyBB != 'undefined') { + console.info(`[自动无缝翻页] - 论坛`); return 14; + } else if (getCSS('head meta[name="generator" i][content="nexusphp" i]') || getXpath('id("footer")[contains(string(), "NexusPHP")]')) { console.info(`[自动无缝翻页] - 论坛`); return 7; - } else if (loadMoreExclude(loadMoreExclude1) && getAllCSS('.load-more, .load_more, .loadmore, #load-more, #load_more, #loadmore, [id^="loadmore"], .show-more, .show_more').length === 1) { + } else if (unsafeWindow.config && ((unsafeWindow.config.assetVersionEncoded && unsafeWindow.config.assetVersionEncoded.indexOf('gitea') !== -1) || (unsafeWindow.config.customEmojis && unsafeWindow.config.customEmojis.gitea))) { + console.info(`[自动无缝翻页] - git 托管系统`); return 15; + + } else if (loadMoreExclude(loadMoreExclude1) && getAllCSS('.load-more, .load_more, .loadmore, #load-more, #load_more, #loadmore, [id^="loadmore"], .show-more:not([data-gps-track]), .show_more, .ajax-more').length === 1) { console.info(`[自动无缝翻页] - 部分自带 自动无缝翻页 的网站 1`); return 8; } else if (loadMoreExclude(loadMoreExclude2) && getAllXpath('//*[self::a or self::span or self::button or self::div][text()="加载更多"][not(@href) or @href="#" or starts-with(@href, "javascript")]').length === 1) { console.info(`[自动无缝翻页] - 部分自带 自动无缝翻页 的网站 2`); return 9; - } else if (getCSS('link[href*="/wp-content/" i], script[src*="/wp-content/" i], head>meta[name=generator][content*="WordPress" i]')) { + } else if (getCSS('link[href*="/wp-content/" i], script[src*="/wp-content/" i], link[href*="/wp-includes/" i], script[src*="/wp-includes/" i], head>meta[name=generator][content*="WordPress" i]')) { //if (getAllCSS('article[class], div[id^="post-"], ul[class*="post"]>li.item, .post').length < 4 || getCSS('#nav-below, nav.navigation, nav.paging-navigation, .pagination, .wp-pagenavi, .pagenavi')) return 0; @@ -296,17 +317,19 @@ } else if (getAllCSS('.entry-content .single-content img').length > 3) { DBSite.wp_article_post.pager.pageE = '.entry-content .single-content' } else if (getAllCSS('.entry-content').length == 1) { - DBSite.wp_article_post.pager.pageE = '.entry-content>*:not(.wbp-cbm):not(.page-links):not(.post-links):not(.article-paging):not(.entry-pagination):not(.pagination):not(.fenye):not(.open-message):not(#social):not(.article-social):not(.single-cat-tag):not(.single-meta):not(#fontsize):not(.clear):not(.tg-m):not(.tg-site):not(footer)' + DBSite.wp_article_post.pager.pageE = '.entry-content>*:not(.wbp-cbm):not(.page-links):not(.post-links):not(.article-paging):not(.entry-pagination):not(.pagination):not(.fenye):not(.open-message):not(#social):not(.article-social):not(.single-cat-tag):not(.single-meta):not(#fontsize):not(.clear):not(.tg-m):not(.tg-site):not(footer):not([class*=pagination])' } else if (getAllCSS('.article-content').length == 1) { - DBSite.wp_article_post.pager.pageE = '.article-content>*:not(.page-links):not(.post-links):not(.article-paging):not(.entry-pagination):not(.pagination):not(.fenye):not(.open-message):not(#social):not(.article-social):not(.single-cat-tag):not(.single-meta):not(#fontsize):not(.clear):not(.tg-m):not(.tg-site):not(footer)' + DBSite.wp_article_post.pager.pageE = '.article-content>*:not(.page-links):not(.post-links):not(.article-paging):not(.entry-pagination):not(.pagination):not(.fenye):not(.open-message):not(#social):not(.article-social):not(.single-cat-tag):not(.single-meta):not(#fontsize):not(.clear):not(.tg-m):not(.tg-site):not(footer):not([class*=pagination])' } else if (getAllCSS('article').length == 1) { - DBSite.wp_article_post.pager.pageE = 'article>*:not(.page-links):not(.post-links):not(.article-paging):not(.entry-pagination):not(.pagination):not(.fenye):not(.open-message):not(#social):not(.article-social):not(.single-cat-tag):not(.single-meta):not(#fontsize):not(.clear):not(.tg-m):not(.tg-site):not(footer)' + DBSite.wp_article_post.pager.pageE = 'article>*:not(.page-links):not(.post-links):not(.article-paging):not(.entry-pagination):not(.pagination):not(.fenye):not(.open-message):not(#social):not(.article-social):not(.single-cat-tag):not(.single-meta):not(#fontsize):not(.clear):not(.tg-m):not(.tg-site):not(footer):not([class*=pagination])' } if (DBSite.wp_article_post.pager.pageE != undefined) console.info(`[自动无缝翻页] - 部分使用 WordPress 的网站 - 文章内`); return 11; } - if (getCSS('a.next, a.next-page')) { + if (getCSS('a.next.page-numbers, a.next-page.page-numbers')) { + DBSite.wp_article.pager.nextL = 'a.next.page-numbers, a.next-page.page-numbers' + } else if (getCSS('a.next, a.next-page')) { DBSite.wp_article.pager.nextL = 'a.next, a.next-page' } 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="下一頁"]')) { 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="下一頁"]' @@ -318,8 +341,11 @@ DBSite.wp_article.pager.nextL = '.nav-previous a, a.nav-previous' } else if (getCSS('.pagination>.page-item.active+li.page-item>a')) { DBSite.wp_article.pager.nextL = '.pagination>.page-item.active+li.page-item>a' - } else if (getXpath('//a[contains(text(), "下一页") or contains(text(), "下一頁") or contains(text(), ">") or contains(text(), "next") or contains(text(), "Next") or contains(text(), "NEXT")]', getCSS('#nav-below, nav.navigation, nav.paging-navigation, .pagination:not([class*="entry"]), .wp-pagenavi, .pagenavi, nav[role="navigation"]'))) { - DBSite.wp_article.pager.nextL = '//*[self::ul or self::nav or self::div][@id="nav-below" or contains(@class, "navigation") or contains(@class, "pagination") or contains(@class, "pagenavi") or @role="navigation"]//a[contains(text(), "下一页") or contains(text(), "下一頁") or contains(text(), ">") or contains(text(), "next") or contains(text(), "Next") or contains(text(), "NEXT")]' + } else { + const temp_page = getCSS('#nav-below, nav.navigation, nav.paging-navigation, #pagination:not([class*="entry"]), .pagination:not([class*="entry"]), .wp-pagenavi, .pagenavi, nav[role="navigation"]') + if (temp_page && getXpath('//a[contains(text(), "下一页") or contains(text(), "下一頁") or contains(text(), ">") or contains(text(), "next") or contains(text(), "Next") or contains(text(), "NEXT")]', temp_page)) { + DBSite.wp_article.pager.nextL = '//*[self::ul or self::nav or self::div][@id="nav-below" or @id="pagination" or contains(@class, "navigation") or contains(@class, "pagination") or contains(@class, "pagenavi") or @role="navigation"]//a[contains(text(), "下一页") or contains(text(), "下一頁") or contains(text(), ">") or contains(text(), "next") or contains(text(), "Next") or contains(text(), "NEXT")]' + } } if (DBSite.wp_article.pager.nextL != undefined) { @@ -344,7 +370,7 @@ if (getAllCSS('.posts-wrapper.row>div>article').length > 3) { DBSite.wp_article.pager.pageE = '.posts-wrapper.row>div' } else if (getAllXpath('//div[contains(@class,"row")]/div/article').length > 3) { - DBSite.wp_article.pager.pageE = '//div[contains(@class,"row")]/div/article/parent::div' + DBSite.wp_article.pager.pageE = '//div[contains(@class,"row")]/div/article' } else if (getAllCSS('article[id^="post-"]').length > 3) { DBSite.wp_article.pager.pageE = 'article[id^="post-"]' } else if (getAllCSS('article[class]').length > 3) { @@ -371,11 +397,11 @@ } else if (getCSS('.stui-page, .stui-page__item, #long-page, .myui-page, .myui-page__item')) { console.info(`[自动无缝翻页] - 部分影视网站`); return 300; - } else if (getCSS('#page') && getCSS('.module-items')) { + } else if (getCSS('#page') && getCSS('.module-items,a.module-poster-item')) { console.info(`[自动无缝翻页] - 部分影视网站 2`); return 301; } else if (getCSS('.ArticleImageBox, .PictureList') && getCSS('.article_page') && getXpath('//div[contains(@class,"article_page")]//a[text()="下一页"]')) { - console.info(`[自动无缝翻页] - 部分美女图站 - 手机版`); return 302; + console.info(`[自动无缝翻页] - 部分美图网站 - 手机版`); return 302; } else if (getCSS('meta[content^=SearXNG i], link[href*=SearXNG i], script[src*=SearXNG i]')) { console.info(`[自动无缝翻页] - 元搜索引擎`); return 303; @@ -385,9 +411,9 @@ console.info(`[自动无缝翻页] - <笔趣阁 1 - 手机版> 模板的小说网站`); return 201; } else if (getCSS('#txt, .txt') && getCSS('#pb_next, .url_next') && getCSS('.chapter-control, .chapter-page-btn')) { console.info(`[自动无缝翻页] - <笔趣阁 2> 模板的小说网站`); return 202; - } else if ((getCSS('meta[name="description" i][content*="小说"], meta[name="description" i][content*="章节"], meta[name="description" i][content*="阅读"], meta[name="keywords" i][content*="笔趣"]') || location.hostname.indexOf('biqu')!=-1 || document.title.match(/笔趣阁|小说|章/)!=null) && getXpath('//a[contains(text(), "下一章") or contains(text(), "下一页") or contains(text(), "下一节")]')) { - let biquge3_pageE= ['[id="chaptercontent" i]','[class~="chaptercontent" i]','[id="booktext" i]','[class~="booktext" i]','[id="txtcontent" i]','[class~="txtcontent" i]','[id="textcontent" i]','[class~="textcontent" i]','[id="read-content" i]','[class~="read-content" i]','[id="txtnav" i]','[class~="txtnav" i]','[id="txt" i][class~="txt" i]','[id="contents" i]','[class~="contents" i]','[id="content" i]','[class~="content" i]'] - for(let biquge3_pageE_ of biquge3_pageE) {if (getAllCSS(biquge3_pageE_).length === 1) {DBSite.biquge3.pager.pageE = biquge3_pageE_;DBSite.biquge3.pager.insertP = [biquge3_pageE_,6];break;}} + } else if ((getCSS('meta[name="description" i][content*="小说"], meta[name="description" i][content*="章节"], meta[name="description" i][content*="阅读"], meta[name="description" i][content*="小說"], meta[name="description" i][content*="章節"], meta[name="description" i][content*="閲讀"], meta[name="keywords" i][content*="笔趣"]') || location.hostname.indexOf('biqu')!=-1 || document.title.match(/笔趣阁|书库|小说|小說|章/)!=null) && getXpath('//a[contains(text(), "下一章") or contains(text(), "下一页") or contains(text(), "下一节")][not(starts-with(@href,"javascript:"))]')) { + let biquge3_pageE= ['[id="chapter_content" i]','[class~="chapter_content" i]','[id="chaptercontent" i]','[class~="chaptercontent" i]','[class~="read_chapterdetail" i]','[id="booktext" i]','[class~="booktext" i]','[id="txtcontent" i]','[class~="txtcontent" i]','[id="textcontent" i]','[class~="textcontent" i]','[id="read-content" i]','[class~="read-content" i]','[id="txtnav" i]','[class~="txtnav" i]','[id="txt" i][class~="txt" i]','[id="contents" i]','[class~="contents" i]','[id="content" i]','[class~="content" i]','[id="acontent" i]','[class~="acontent" i]','[id="contentbox" i]','.container>.con'] + for(let biquge3_pageE_ of biquge3_pageE) {if (getAllCSS(biquge3_pageE_).length === 1) {DBSite.biquge3.pager.pageE = biquge3_pageE_;DBSite.biquge3.pager.insertP = [biquge3_pageE_,6];DBSite.biquge3.style = biquge3_pageE_+'>.readinline, ' + DBSite.biquge3.style;break;}} if (DBSite.biquge3.pager.pageE != undefined) {console.info(`[自动无缝翻页] - <笔趣阁 3> 模板的小说网站`); return 203;} } return 0; @@ -406,10 +432,14 @@ DBSite.xiuno.url(); break; case 6: // < 所有 XenForo 论坛 > DBSite.xenforo.url(); break; + case 14: // < 所有 MyBB 论坛 > + DBSite.mybb.url(); break; case 7: // < 所有 NexusPHP 论坛 > DBSite.nexusphp.url(); break; + case 15: // < 所有 Forgejo/Gitea> git 托管系统 > + DBSite.forgejoGitea.url(); break; case 8: // < 部分自带 自动无缝翻页 的网站 1 > - DBSite.loadmore.url('.load-more, .load_more, .loadmore, #load-more, #load_more, #loadmore, [id^="loadmore"], .show-more, .show_more'); break; + DBSite.loadmore.url('.load-more, .load_more, .loadmore, #load-more, #load_more, #loadmore, [id^="loadmore"], .show-more, .show_more, .ajax-more'); break; case 9: // < 部分自带 自动无缝翻页 的网站 2 > DBSite.loadmore.url('//*[self::a or self::span or self::button or self::div][text()="加载更多"][not(@href) or @href="#" or starts-with(@href, "javascript")]'); break; case 10: // < 部分使用 WordPress 的网站 > @@ -432,7 +462,7 @@ curSite = DBSite.yingshi; break; case 301: // < 部分影视网站 2 > curSite = DBSite.yingshi2; break; - case 302: // < 部分美女图站 - 手机版 > + case 302: // < 部分美图网站 - 手机版 > curSite = DBSite.meinvtu_m; break; case 303: // < SearXNG 元搜索引擎 > document.cookie='infinite_scroll=1; expires=Thu, 18 Dec 2031 12:00:00 GMT; path=/'; @@ -446,14 +476,14 @@ /* inherits: 继承标识,仅用于自定义规则,用于增删改某个外置规则的部分规则时,可使用该标识来省略不需要修改的规则,只写有变化的规则 - url: 匹配到该域名后要执行的函数/正则(一般用于根据 URL 分配相应翻页规则) + url: 匹配到该域名后要执行的函数/正则(一般用于根据 URL 分配相应翻页规则,url 规则中可通过操作 rule 这个对象变量来修改当前网页实际应用的规则) urlC: 对于使用 pjax 技术的网站,需要监听 URL 变化来重新判断翻页规则(需要放在 url: 中,自定义规则的话需要使用 fun.isUrlC()) noReferer: 获取下一页内容时,不携带 Referer(部分网站携带与不携带可能不一样) hiddenPN: 不显示脚本左下角的页码 history: 添加历史记录 并 修改当前 URL(默认开启,对于不支持的网站要设置为 false) thread: 对于社区类网站,要在 帖子内 的规则中加入这个,用于脚本的 [帖子内自动翻页] 功能(即用户可以选择开启/关闭所有社区类网站帖子内的自动翻页) - style: 要插入网页的 CSS Style 样式 + style: 要插入网页的 CSS Style 样式,当只需要单纯屏蔽部分网页元素时,可以只写 CSS 选择器省略掉 {display: none !important;} retry: 允许获取失败后重试 blank: 强制新标签页打开链接 1 = 网页 添加 来让所有链接默认新标签页打开(对已单独指定 target 或已监听点击事件的元素无效) @@ -471,12 +501,12 @@ pager: { nextText: 按钮文本,当按钮文本 = 该文本时,才会点击按钮加载下一页(避免一瞬间加载太多次下一页,下同) nextTextOf: 按钮文本的一部分,当按钮文本包含该文本时,才会点击按钮加载下一页 nextHTML: 按钮内元素,当按钮内元素 = 该元素内容时,才会点击按钮加载下一页 - interval: 点击间隔时间,对于没有按钮文字变化的按钮,可以手动指定间隔时间(单位 ms,默认 500,当指定上面三个时,会忽略 interval) + interval: 点击间隔时间,对于没有按钮文字变化的按钮,可以手动指定间隔时间(省略后默认 500ms,当指定上面三个时,会忽略 interval) isHidden: 只有下一页按钮可见时(没有被隐藏),才会点击 3 = 依靠 [基准元素] 与 [浏览器可视区域底部] 之间的距离缩小来触发翻页(适用于:主体元素下方内容太多 且 高度不固定时) - scrollE: 作为基准线的元素(一般为底部页码元素),和 replaceE 一样的话可以省略 - scrollD: 基准元素 - 可视区域底部 + scrollE: 作为基准线的元素(一般为底部页码元素),省略后默认等同 replaceE(如果这个也未指定则改用 nextL) + scrollD: 当 [基准元素] 与 [可视区域底部] 之间的距离 等于或小于该值时,将触发翻页,省略后默认 2000 4 = 动态加载类网站(适用于:简单的动态加载内容网站) insertE: 用来插入元素的函数 @@ -486,7 +516,7 @@ pager: { iframe: 这个必须加到 pager{} 外面(这样才会在该域名的 iframe 框架下运行脚本) 6 = 通过 iframe 获取下一页动态加载内容插入本页,只有一个娃(适用于:部分动态加载内容的网站,与上面不同的是,该模式适合简单的网页,没有复杂事件什么的) - loadTime: 预留的网页加载时间,确保网页内容加载完成 + loadTime: 预留的网页加载时间,确保网页内容加载完成(省略后默认为 300ms) nextL: 下一页链接所在元素 pageE: 要从下一页获取的元素 @@ -504,7 +534,7 @@ pager: { 注意:如 pageE 中选择了多类元素,则不能省略 insertP(比如包含 `,` 与 `|` 符号),除非另外的选择器是