Skip to content

Commit cf8a1bb

Browse files
committed
优化 代码(针对 pjax 网页)
1 parent e9c2d28 commit cf8a1bb

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

Autopage.user.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// ==UserScript==
22
// @name 自动无缝翻页
3-
// @version 2.4.7
3+
// @version 2.4.8
44
// @author X.I.U
55
// @description 无缝拼接下一页内容(瀑布流),目前支持:[所有使用「Discuz!、Flarum、DUX(WordPress)」的网站]、百度、谷歌、必应、搜狗、头条、360、微信、贴吧、豆瓣、微博、NGA、V2EX、龙的天空、起点小说、煎蛋网、IT之家、千图网、Pixabay、3DM、游侠网、游民星空、NexusMods、Steam 创意工坊、小霸王其乐无穷、CS.RIN.RU、FitGirl、茶杯狐、NO视频、低端影视、奈菲影视、91美剧网、真不卡影院、片库、音范丝、BT之家、萌番组、动漫花园、樱花动漫、爱恋动漫、AGE 动漫、Nyaa、SrkBT、RARBG、SubHD、423Down、不死鸟、扩展迷、极简插件、小众软件、动漫狂、漫画猫、漫画DB、HiComic、动漫之家、古风漫画网、PubMed、wikiHow、GreasyFork、Github、StackOverflow(以上仅一部分,更多的写不下了...
66
// @match *://*/*
@@ -2358,6 +2358,7 @@
23582358
curSite = DBSite.github_star;
23592359
} else if (location.pathname.indexOf('/issues') > -1 && location.pathname.indexOf('/issues/') === -1) {
23602360
curSite = DBSite.github_issues;
2361+
console.log(1111111111)
23612362
} else if (location.pathname === '/search') {
23622363
if (!location.search) return
23632364
if (location.search.indexOf('type=Repositories') > -1 || location.search.indexOf('type=') === -1) {
@@ -2386,7 +2387,7 @@
23862387
pageElement: 'css;#js-pjax-container .position-relative div[class^="col-lg-"] > div:not(.position-relative):not(.paginate-container)',
23872388
insertPosition: ['css;.paginate-container', 1],
23882389
replaceE: 'css;.paginate-container',
2389-
scrollDelta: 2500
2390+
scrollDelta: 3000
23902391
}
23912392
}, // Github - 用户 Star 列表
23922393
github_issues: {
@@ -2397,7 +2398,7 @@
23972398
pageElement: 'css;.js-navigation-container.js-active-navigation-container > div[id^="issue_"]',
23982399
insertPosition: ['css;.js-navigation-container.js-active-navigation-container', 3],
23992400
replaceE: 'css;.pagination',
2400-
scrollDelta: 2000
2401+
scrollDelta: 3000
24012402
}
24022403
}, // Github - Issues 列表
24032404
github_search: {
@@ -2898,6 +2899,7 @@
28982899
nowLocation = location.href; curSite = {SiteTypeID: 0}; pageNum.now = 1; // 重置规则+页码
28992900
registerMenuCommand(); // 重新判断规则
29002901
curSite.pageUrl = ''; // 下一页URL
2902+
pageLoading(); // 自动无缝翻页
29012903

29022904
if (GM_getValue('menu_page_number')) {pageNumber('add');} else {pageNumber('set');} // 显示页码
29032905
pausePageEvent(); // 左键双击网页空白处暂停翻页

0 commit comments

Comments
 (0)