Skip to content

Commit bbff0e4

Browse files
committed
新增 [MacWK] 支持; 优化 [自定义翻页规则] 内置函数(getNextEPN、getNextUPN)
1 parent 0855fc0 commit bbff0e4

3 files changed

Lines changed: 18 additions & 6 deletions

File tree

Autopage.user.js

Lines changed: 5 additions & 5 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 5.2.1
6+
// @version 5.2.2
77
// @author X.I.U
88
// @description ⭐无缝追加下一页内容到网页底部(瀑布流)⭐,目前支持:【所有「Discuz!、Flarum、phpBB、Xiuno、XenForo、NexusPHP...」论坛】【百度、谷歌(Google)、必应(Bing)、搜狗、微信、360、Yahoo、Yandex 等搜索引擎...】、贴吧、豆瓣、知乎、微博、NGA、V2EX、B 站(Bilibili)、煎蛋网、龙的天空、起点中文、IT之家、千图网、千库网、Pixabay、Pixiv、3DM、游侠网、游民星空、NexusMods、Steam 创意工坊、CS.RIN.RU、BT之家、萌番组、动漫花园、樱花动漫、爱恋动漫、AGE 动漫、Nyaa、SrkBT、RARBG、SubHD、423Down、不死鸟、扩展迷、小众软件、【动漫狂、漫画猫、漫画屋、漫画 DB、动漫之家、拷贝漫画、HiComic、Mangabz、Xmanhua 等漫画网站...】、PubMed、Z-Library、GreasyFork、Github、StackOverflow(以上仅一小部分,更多的写不下了...
99
// @description:zh-TW ⭐無縫追加下一頁內容到網頁底部(瀑布流)⭐,支持各論壇、社交、遊戲、漫畫、小說、學術、搜索引擎(Google、Bing、Yahoo...) 等網站~
@@ -2907,13 +2907,13 @@ function: {
29072907
} else {
29082908
url = location.pathname + a + nextNum + b;
29092909
}
2910-
url = location.origin + url;
2910+
url = location.origin + url + location.search;
29112911
}
29122912
return url
29132913
}
29142914
// 通用型获取下一页地址(从 URL 中获取页码,URL 替换 pathname 路径)
2915-
function getNextUPN(reg1, reg, a, b = '', initP = '2', endP) {
2916-
let nextNum = reg1.exec(location.pathname);
2915+
function getNextUPN(urlReg, reg, a, b = '', initP = '2', endP) {
2916+
let nextNum = urlReg.exec(location.pathname);
29172917
if (nextNum) {
29182918
nextNum = String(parseInt(nextNum[0])+1);
29192919
if (endP && (parseInt(nextNum[0]) > parseInt(endP))) return ''
@@ -2931,7 +2931,7 @@ function: {
29312931
} else {
29322932
url = location.pathname + a + nextNum + b;
29332933
}
2934-
url = location.origin + url;
2934+
url = location.origin + url + location.search;
29352935
return url
29362936
}
29372937
// 通用型获取下一页地址(从 URL 中获取页码,URL 替换 page= 参数)

other/Autopage/ruleUpdateTime.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1646479052
1+
1646548886

other/Autopage/rules.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2796,6 +2796,18 @@
27962796
"scrollD": 2000
27972797
}
27982798
},
2799+
"MacWK": {
2800+
"host": "www.macwk.com",
2801+
"url": "fun.isUrlC(); return (fun.indexOF(/^\\/(soft|article)\\/.+\\/p\\d/))",
2802+
"style": ".app-content-bottom {display: none !important;}",
2803+
"pager": {
2804+
"nextL": "js;return fun.getNextUPN(/(?<=\\/p)\\d*$/, /p\\d*$/, 'p', '', '2', 'li.number:not(.active):last-of-type')",
2805+
"pageE": ".list-animation-leftIn"
2806+
},
2807+
"function": {
2808+
"bF": "pageE.forEach(function (one) {if (fun.getCSS('.macwk-app__header--icon--content[style^=\"--img:\"] + img:not(src)', one)){fun.getCSS('.macwk-app__header--icon--content[style^=\"--img:\"] + img:not(src)', one).src = /(?<=\\().+(?=\\))/.exec(fun.getCSS('.macwk-app__header--icon--content[style^=\"--img:\"]', one).style.cssText)[0].replaceAll('\\\\','');}}); return pageE"
2809+
}
2810+
},
27992811
"小众软件": {
28002812
"host": "www.appinn.com",
28012813
"pager": {

0 commit comments

Comments
 (0)