From 157087cd475997fc0e50bd9a13b7f08a707988d0 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Tue, 6 Sep 2022 09:35:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=20[nexusmods]=20=E8=A7=84?= =?UTF-8?q?=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Autopage.user.js | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/Autopage.user.js b/Autopage.user.js index 69a222d..9eac50e 100644 --- a/Autopage.user.js +++ b/Autopage.user.js @@ -3,7 +3,7 @@ // @name:zh-CN 自动无缝翻页 // @name:zh-TW 自動無縫翻頁 // @name:en AutoPager -// @version 6.2.5 +// @version 6.2.6 // @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...) 等網站~ @@ -831,12 +831,12 @@ function: { }, // NexusPHP 论坛 nexusmods: { host: 'www.nexusmods.com', - url: ()=> {urlC = true; if (!(lp == '/' || indexOF(/\/mods\/\d+/) || !getCSS('.pagination li.next'))) {curSite = DBSite.nexusmods;}}, + url: ()=> {urlC = true; if (!(lp == '/' || !getCSS('.pagination a.page-selected'))) {curSite = DBSite.nexusmods;}}, blank: 1, history: false, pager: { nextL: nexusmods_nextL, - pageE: 'ul.tiles > li', + pageE: 'ul.tiles>li,li.comment:not(.comment-sticky)', replaceE: '.pagination', scrollD: 3500 }, @@ -1369,23 +1369,19 @@ function: { // [NexusMods] 获取下一页地址 function nexusmods_nextL() { - if (getCSS('.nexus-ui-blocker') || !getCSS('.pagination li.next')) return + if (getCSS('.nexus-ui-blocker') || !getCSS('.pagination a.page-selected')) return let modList; - if (indexOF('/news')) {modList = RH_NewsTabContent;} else if (indexOF('/users/') && indexOF('tab=user+files','s')) {modList = RH_UserModsTab;} else {modList = RH_ModList;} + if (indexOF('/news')) {modList = RH_NewsTabContent;} else if (indexOF('/users/') && indexOF('tab=user+files','s')) {modList = RH_UserModsTab;} else if (indexOF('/mods/') && indexOF('tab=posts','s')) {modList = RH_CommentContainer;} else {modList = RH_ModList;} if (!modList) return let out_items = JSON.stringify(modList.out_items).replace(/{|}|"/g,''), - nextNum = getXpath('//div[contains(@class, "pagenav")][1]//a[contains(@class, "page-selected")]/parent::li/following-sibling::li/a'), + nextNum = getXpath('//div[contains(@class, "pagination")][1]//a[contains(@class, "page-selected")]/parent::li/following-sibling::li[1]/a'), categories = modList.out_items.categories, categoriesUrl = '', tags_yes = modList.out_items.tags_yes, tags_yesUrl = '', search = modList.out_items.search, searchUrl = ''; var url = ''; if (nextNum && nextNum.innerText) { nextNum = nextNum.innerText; - if (out_items.indexOf('page:') > -1) { - out_items = out_items.replace(/page:\d+/, `page:${nextNum}`) - } else { - out_items += `,page:${nextNum}`; - } + if (out_items.indexOf('page:') > -1) {out_items = out_items.replace(/page:\d+/, `page:${nextNum}`);} else {out_items += `,page:${nextNum}`;} if (categories && categories != []) { for (let i = 0; i < categories.length; i++) {categoriesUrl += `,categories[]:${categories[i]}`;} if (out_items.indexOf('categories:') > -1) out_items = out_items.replace(/categories:\[.*\]/, categoriesUrl.replace(/,/,''))