From fed35f404a1fca167780448dbaea7b453e4dc947 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Tue, 28 Sep 2021 18:16:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20[Github]=20Releases?= =?UTF-8?q?=E3=80=81Tags=E3=80=81Commits=20=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Autopage.user.js | 41 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/Autopage.user.js b/Autopage.user.js index 7b808bb..221cea6 100644 --- a/Autopage.user.js +++ b/Autopage.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 自动无缝翻页 -// @version 2.6.0 +// @version 2.6.1 // @author X.I.U // @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(以上仅一部分,更多的写不下了... // @match *://*/* @@ -2701,6 +2701,12 @@ curSite = DBSite.github_issues; } else if (location.pathname.indexOf('/discussions') > -1 && !(/\/discussions\/\d+/.test(location.pathname))) { curSite = DBSite.github_discussions; + } else if (location.pathname.indexOf('/releases') > -1 && location.pathname.indexOf('/releases/tag/') === -1) { + curSite = DBSite.github_releases; + } else if (location.pathname.indexOf('/tags') > -1 && location.pathname.indexOf('/tags/') === -1) { + curSite = DBSite.github_tags; + } else if (location.pathname.indexOf('/commits') > -1) { + curSite = DBSite.github_commits; } else if (location.pathname.indexOf('/search') > -1) { if (!location.search) return if (location.search.indexOf('type=Repositories') > -1 || location.search.indexOf('type=') === -1) { @@ -2754,6 +2760,39 @@ scrollDelta: 3000 } }, // Github - Discussions 列表 + github_releases: { + SiteTypeID: 0, + pager: { + type: 1, + nextLink: '//div[@class="pagination"]/a[contains(text(), "Next")]', + pageElement: 'css;.repository-content >.position-relative > div', + insertPosition: ['css;.repository-content >.position-relative', 3], + replaceE: 'css;.pagination', + scrollDelta: 3000 + } + }, // Github - Releases 列表 + github_tags: { + SiteTypeID: 0, + pager: { + type: 1, + nextLink: '//div[@class="pagination"]/a[contains(text(), "Next")]', + pageElement: 'css;.repository-content > .Box > div.Box-row', + insertPosition: ['css;.repository-content > .Box', 3], + replaceE: 'css;.pagination', + scrollDelta: 3000 + } + }, // Github - Tags 列表 + github_commits: { + SiteTypeID: 0, + pager: { + type: 1, + nextLink: '//div[@class="paginate-container"]//a[contains(text(), "Older")]', + pageElement: 'css;div.js-navigation-container > div', + insertPosition: ['css;div.js-navigation-container', 3], + replaceE: 'css;.paginate-container', + scrollDelta: 3000 + } + }, // Github - Commits 列表 github_search: { SiteTypeID: 0, pager: {