Skip to content

Commit 157087c

Browse files
committed
优化 [nexusmods] 规则
1 parent 1051126 commit 157087c

1 file changed

Lines changed: 7 additions & 11 deletions

File tree

Autopage.user.js

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// @name:zh-CN 自动无缝翻页
44
// @name:zh-TW 自動無縫翻頁
55
// @name:en AutoPager
6-
// @version 6.2.5
6+
// @version 6.2.6
77
// @author X.I.U
88
// @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(以上仅一小部分,更多的写不下了...
99
// @description:zh-TW ⭐無縫加載 下一頁內容 至網頁底部(類似瀑布流)⭐,支持各論壇、社交、遊戲、漫畫、小說、學術、搜索引擎(Google、Bing、Yahoo...) 等網站~
@@ -831,12 +831,12 @@ function: {
831831
}, // NexusPHP 论坛
832832
nexusmods: {
833833
host: 'www.nexusmods.com',
834-
url: ()=> {urlC = true; if (!(lp == '/' || indexOF(/\/mods\/\d+/) || !getCSS('.pagination li.next'))) {curSite = DBSite.nexusmods;}},
834+
url: ()=> {urlC = true; if (!(lp == '/' || !getCSS('.pagination a.page-selected'))) {curSite = DBSite.nexusmods;}},
835835
blank: 1,
836836
history: false,
837837
pager: {
838838
nextL: nexusmods_nextL,
839-
pageE: 'ul.tiles > li',
839+
pageE: 'ul.tiles>li,li.comment:not(.comment-sticky)',
840840
replaceE: '.pagination',
841841
scrollD: 3500
842842
},
@@ -1369,23 +1369,19 @@ function: {
13691369

13701370
// [NexusMods] 获取下一页地址
13711371
function nexusmods_nextL() {
1372-
if (getCSS('.nexus-ui-blocker') || !getCSS('.pagination li.next')) return
1372+
if (getCSS('.nexus-ui-blocker') || !getCSS('.pagination a.page-selected')) return
13731373
let modList;
1374-
if (indexOF('/news')) {modList = RH_NewsTabContent;} else if (indexOF('/users/') && indexOF('tab=user+files','s')) {modList = RH_UserModsTab;} else {modList = RH_ModList;}
1374+
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;}
13751375
if (!modList) return
13761376
let out_items = JSON.stringify(modList.out_items).replace(/{|}|"/g,''),
1377-
nextNum = getXpath('//div[contains(@class, "pagenav")][1]//a[contains(@class, "page-selected")]/parent::li/following-sibling::li/a'),
1377+
nextNum = getXpath('//div[contains(@class, "pagination")][1]//a[contains(@class, "page-selected")]/parent::li/following-sibling::li[1]/a'),
13781378
categories = modList.out_items.categories, categoriesUrl = '',
13791379
tags_yes = modList.out_items.tags_yes, tags_yesUrl = '',
13801380
search = modList.out_items.search, searchUrl = '';
13811381
var url = '';
13821382
if (nextNum && nextNum.innerText) {
13831383
nextNum = nextNum.innerText;
1384-
if (out_items.indexOf('page:') > -1) {
1385-
out_items = out_items.replace(/page:\d+/, `page:${nextNum}`)
1386-
} else {
1387-
out_items += `,page:${nextNum}`;
1388-
}
1384+
if (out_items.indexOf('page:') > -1) {out_items = out_items.replace(/page:\d+/, `page:${nextNum}`);} else {out_items += `,page:${nextNum}`;}
13891385
if (categories && categories != []) {
13901386
for (let i = 0; i < categories.length; i++) {categoriesUrl += `,categories[]:${categories[i]}`;}
13911387
if (out_items.indexOf('categories:') > -1) out_items = out_items.replace(/categories:\[.*\]/, categoriesUrl.replace(/,/,''))

0 commit comments

Comments
 (0)