From 2c36d8098b4ba59ad75289dba93c6240dfb5d44c Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Thu, 23 Sep 2021 09:44:35 +0800 Subject: [PATCH 0001/1810] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20[=E5=B1=8F?= =?UTF-8?q?=E8=94=BD=E9=A6=96=E9=A1=B5=E6=B4=BB=E5=8A=A8=E5=B9=BF=E5=91=8A?= =?UTF-8?q?]=20=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Zhihu-Beautification.user.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Zhihu-Beautification.user.js b/Zhihu-Beautification.user.js index 156f9ccef..cc4e89a9d 100644 --- a/Zhihu-Beautification.user.js +++ b/Zhihu-Beautification.user.js @@ -2,7 +2,7 @@ // @name 知乎美化 // @version 1.4.0 // @author X.I.U -// @description 宽屏显示、暗黑模式(4种)、暗黑模式跟随浏览器、隐藏文章开头大图、调整图片最大高度、屏蔽首页活动广告、向下翻时自动隐藏顶栏、文章编辑页面与实际文章宽度一致 +// @description 宽屏显示、暗黑模式(4种)、暗黑模式跟随浏览器、屏蔽首页活动广告、隐藏文章开头大图、调整图片最大高度、向下翻时自动隐藏顶栏、文章编辑页面与实际文章宽度一致 // @match *://www.zhihu.com/* // @match *://zhuanlan.zhihu.com/* // @icon https://static.zhihu.com/heifetz/favicon.ico From e2649ccb126c01f87c6f8f7cc191f83fb7f66993 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Thu, 23 Sep 2021 16:07:21 +0800 Subject: [PATCH 0002/1810] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20[=E5=A4=A9?= =?UTF-8?q?=E6=B6=AF=E7=A4=BE=E5=8C=BA]=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 | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/Autopage.user.js b/Autopage.user.js index c6a8d584a..d86afcc04 100644 --- a/Autopage.user.js +++ b/Autopage.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 自动无缝翻页 -// @version 2.4.3 +// @version 2.4.4 // @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 *://*/* @@ -482,6 +482,34 @@ scrollDelta: 1000 } }, // 微博评论 + tianya: { + SiteTypeID: 0, + host: 'bbs.tianya.cn', + functionStart: function() {if (location.pathname.indexOf('/list') > -1) { + curSite = DBSite.tianya; + } else if (location.pathname.indexOf('/post') > -1) { + curSite = DBSite.tianya_post; + }}, + pager: { + type: 1, + nextLink: '//div[contains(@class, "pages")]/div[@class="links"]/a[contains(text(), "下一页")]', + pageElement: 'css;.tab-bbs-list > tbody:not(:first-of-type)', + insertPosition: ['css;table.tab-bbs-list', 3], + replaceE: '//div[contains(@class, "pages")]', + scrollDelta: 1500 + } + }, // 天涯社区 + tianya_post: { + SiteTypeID: 0, + pager: { + type: 1, + nextLink: 'a.js-keyboard-next[href]', + pageElement: 'css;.atl-main > div[class="atl-item"]', + insertPosition: ['css;.atl-main', 3], + replaceE: 'css;.atl-pages > form', + scrollDelta: 1500 + } + }, // 天涯社区 - 帖子内 nga_thread: { SiteTypeID: 0, host: ['bbs.nga.cn', 'ngabbs.com', 'nga.178.com', 'g.nga.cn'], From 40a736a4aaf91fb84aeed618874e4795ec5815c3 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Thu, 23 Sep 2021 16:51:23 +0800 Subject: [PATCH 0003/1810] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20[BTHaha]=20?= =?UTF-8?q?=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Autopage.user.js | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/Autopage.user.js b/Autopage.user.js index d86afcc04..5e57aa13c 100644 --- a/Autopage.user.js +++ b/Autopage.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 自动无缝翻页 -// @version 2.4.4 +// @version 2.4.5 // @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 *://*/* @@ -1503,6 +1503,26 @@ scrollDelta: 2000 } }, // MINI4K + bthaha: { + SiteTypeID: 0, + host: /bthaha/, + functionStart: function() {if (location.pathname.indexOf('/search/') > -1) { + curSite = DBSite.bthaha; + document.lastElementChild.appendChild(document.createElement('style')).textContent = '[id^="list_top"], [id^="list_bottom"] {display: none !important;}'; + document.querySelectorAll('[id^="list_top"], [id^="list_bottom"]').forEach(function (one) {one.parentElement.parentElement.hidden = true;}); + }}, + pager: { + type: 1, + nextLink: '//ul[@class="pagination"]/li/a[contains(text(), "下一页")]', + pageElement: 'css;table.table > tbody > tr', + insertPosition: ['css;table.table > tbody', 3], + replaceE: 'css;ul.pagination', + scrollDelta: 1000 + }, + function: { + before: bthaha_functionBefore + } + }, // BTHaha a4k: { SiteTypeID: 0, host: 'www.a4k.net', @@ -3162,6 +3182,16 @@ } + // [BTHaha] 的插入前函数(加载图片) + function bthaha_functionBefore(pageElems) { + pageElems.forEach(function (one) { + let now = one.querySelector('[id^="list_top"], [id^="list_bottom"]') + if (now) {one.hidden = true;} + }); + return pageElems + } + + // [射手网] 获取下一页地址 function assrt_functionNext() { let nextXPAHT = '//a[@id="pl-nav"][@href][contains(text(), ">")]' From 3d8fe13f0e21232b9378786d95f92f8cad6647ca Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Fri, 24 Sep 2021 08:23:46 +0800 Subject: [PATCH 0004/1810] =?UTF-8?q?=E4=BC=98=E5=8C=96=20[=E5=B1=8F?= =?UTF-8?q?=E8=94=BD=E9=A6=96=E9=A1=B5=E6=B4=BB=E5=8A=A8=E5=B9=BF=E5=91=8A?= =?UTF-8?q?]=20=E5=8A=9F=E8=83=BD=EF=BC=88=E6=81=A2=E5=A4=8D=E9=A1=B6?= =?UTF-8?q?=E9=83=A8=E6=A8=AA=E6=9D=A1=E4=B8=BA=E9=BB=98=E8=AE=A4=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Zhihu-Beautification.user.js | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/Zhihu-Beautification.user.js b/Zhihu-Beautification.user.js index cc4e89a9d..1f3a42434 100644 --- a/Zhihu-Beautification.user.js +++ b/Zhihu-Beautification.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 知乎美化 -// @version 1.4.0 +// @version 1.4.1 // @author X.I.U // @description 宽屏显示、暗黑模式(4种)、暗黑模式跟随浏览器、屏蔽首页活动广告、隐藏文章开头大图、调整图片最大高度、向下翻时自动隐藏顶栏、文章编辑页面与实际文章宽度一致 // @match *://www.zhihu.com/* @@ -175,15 +175,26 @@ function addStyle() { let style = `/* 屏蔽登录提示(问题页中间的元素) */ .Question-mainColumnLogin {display: none !important;} -/* 屏蔽首页广告 */ -.TopstoryItem--advertCard {display: none !important;} /* 屏蔽回答页广告 */ .Pc-card.Card {display: none !important;} /* 屏蔽文章页推荐文章 */ .Recommendations-Main {display: none !important;} +`, + style_index = `/* 屏蔽首页广告 */ +.TopstoryItem--advertCard {display: none !important;} /* 屏蔽首页活动广告 */ main.App-main > .Topstory > div:not(.Topstory-container) {display: none !important;} -`, +html[data-theme="light"] header.AppHeader {background-color: #ffffff !important; -webkit-box-shadow: 0 1px 3px rgba(18,18,18,.1) !important; box-shadow: 0 1px 3px rgba(18,18,18,.1) !important;} +html[data-theme="light"] header.AppHeader a[aria-label="知乎"] svg {filter: invert(57%) sepia(71%) saturate(949%) hue-rotate(190deg) brightness(86%) contrast(188%) !important;} +html[data-theme="light"] .AppHeader-TabsLink {color: #8590a6 !important; font-weight: normal !important;} +html[data-theme="light"] .AppHeader-userInfo Button svg, .SearchBar-searchButton svg {color: inherit !important;} +html[data-theme="light"] .Input-wrapper.Input-wrapper--grey {background: #f6f6f6 !important;} +html[data-theme="light"] .AppHeader-SearchBar input.Input {color: #121212 !important;} +html[data-theme="light"] .AppHeader-SearchBar input::-webkit-input-placeholder {color: #a4a4a4 !important;} +html[data-theme="light"] .AppHeader-SearchBar input:-moz-placeholder {color: #a4a4a4 !important;} +html[data-theme="light"] .AppHeader-SearchBar input::-moz-placeholder {color: #a4a4a4 !important;} +html[data-theme="light"] .Button--primary.Button--blue {color: #fff !important;background-color: #06f !important;} + `, style_widescreenDisplayIndex = `/* 宽屏显示 - 首页 */ .Topstory-mainColumn, .QuestionWaiting-mainColumn {width: inherit !important;} .GlobalSideBar {display: none !important;} @@ -419,6 +430,8 @@ html {filter: brightness(75%) sepia(30%) !important; background-image: url();} } } + if (location.pathname === '/' || location.pathname === '/hot' || location.pathname === '/follow') style += style_index; + // 宽屏显示 if (menu_value('menu_widescreenDisplayIndex')) style += style_widescreenDisplayIndex; if (menu_value('menu_widescreenDisplayQuestion') && location.pathname.indexOf('/question/') > -1) style += style_widescreenDisplayQuestion; From 314a5562e87e6c6a2b17e73ba337f4802a48a03a Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Fri, 24 Sep 2021 10:34:22 +0800 Subject: [PATCH 0005/1810] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20[=E8=BD=BB?= =?UTF-8?q?=E4=B9=8B=E6=96=87=E5=BA=93=E3=80=81=E6=89=B6=E5=A5=B9=E5=8A=A8?= =?UTF-8?q?=E6=BC=AB]=20=E6=94=AF=E6=8C=81;=20=E6=96=B0=E5=A2=9E=20[?= =?UTF-8?q?=E5=8A=A8=E6=BC=AB=E8=8A=B1=E5=9B=AD]=20=E5=85=B6=E4=BB=96?= =?UTF-8?q?=E5=9F=9F=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Autopage.user.js | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/Autopage.user.js b/Autopage.user.js index 5e57aa13c..3845410e4 100644 --- a/Autopage.user.js +++ b/Autopage.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 自动无缝翻页 -// @version 2.4.5 +// @version 2.4.6 // @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 *://*/* @@ -1401,7 +1401,7 @@ }, // 爱恋动漫 dmhy: { SiteTypeID: 0, - host: 'dmhy.anoneko.com', + host: ['share.dmhy.org', 'dmhy.anoneko.com'], pager: { type: 1, nextLink: '//div[@class="nav_title"]/a[@href][contains(text(), "下一頁")]', @@ -1414,6 +1414,18 @@ after: function() {document.body.appendChild(document.createElement('script')).textContent = `$('#topic_list > tbody > tr:even:not(.even):not(.odd)').addClass('even'); $('#topic_list > tbody > tr:odd:not(.even):not(.odd)').addClass('odd');`;} } }, // 动漫花园 + futaacg: { + SiteTypeID: 0, + host: 'futaacg.com', + pager: { + type: 1, + nextLink: 'css;ul.pagination a[rel="next"]', + pageElement: 'css;.topic-list > div', + insertPosition: ['css;.topic-list', 3], + replaceE: 'css;ul.pagination', + scrollDelta: 1500 + } + }, // 扶她动漫 bangumi: { SiteTypeID: 0, host: 'bangumi.moe', @@ -1632,6 +1644,23 @@ scrollDelta: 900 } }, // 起点小说 - 阅读页 + linovel: { + SiteTypeID: 0, + host: 'www.linovel.net', + functionStart: function() {if (/\/book\/\d+\/.+\.html/.test(location.pathname)) { + document.lastElementChild.appendChild(document.createElement('style')).textContent = '.reward-section {display: none !important;}'; + } else if (location.pathname.indexOf('/cat/') > -1) { + curSite = DBSite.linovel; + }}, + pager: { + type: 1, + nextLink: '//ul[@class="pagination"]/li/a[contains(text(), "下一页")]', + pageElement: 'css;.rank-book-list > div', + insertPosition: ['css;.rank-book-list', 3], + replaceE: 'css;ul.pagination', + scrollDelta: 1000 + } + }, // 轻之文库 linovelib: { SiteTypeID: 0, host: 'www.linovelib.com', From e9c2d2811dc0c3c18e26cb5937753831f3a76697 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Fri, 24 Sep 2021 15:51:17 +0800 Subject: [PATCH 0006/1810] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20[A=E5=B2=9B]=20?= =?UTF-8?q?=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Autopage.user.js | 61 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 60 insertions(+), 1 deletion(-) diff --git a/Autopage.user.js b/Autopage.user.js index 3845410e4..e33fa669e 100644 --- a/Autopage.user.js +++ b/Autopage.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 自动无缝翻页 -// @version 2.4.6 +// @version 2.4.7 // @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 *://*/* @@ -510,6 +510,65 @@ scrollDelta: 1500 } }, // 天涯社区 - 帖子内 + adnmb3: { + SiteTypeID: 0, + host: 'adnmb3.com', + functionStart: function() { + if (location.pathname.indexOf('/m/f/') > -1) { + curSite = DBSite.adnmb3_mf; + } else if (location.pathname.indexOf('/m/t/') > -1) { + curSite = DBSite.adnmb3_mt; + } else if (location.pathname.indexOf('/f/') > -1 || location.pathname.indexOf('/Forum/') > -1) { + curSite = DBSite.adnmb3; + } else if (location.pathname.indexOf('/t/') > -1) { + curSite = DBSite.adnmb3_t; + }}, + pager: { + type: 1, + nextLink: '//ul[contains(@class, "pagination")]//a[contains(text(), "下一页")]', + pageElement: 'css;.h-threads-list > *, script[src$="/h.desktop.js"]', + insertPosition: ['css;.h-threads-list', 3], + replaceE: '//ul[contains(@class, "pagination")]', + scriptType: 3, + scrollDelta: 1500 + } + }, // A 岛 + adnmb3_t: { + SiteTypeID: 0, + pager: { + type: 1, + nextLink: '//ul[contains(@class, "pagination")]//a[contains(text(), "下一页")]', + pageElement: 'css;.h-threads-list > .h-threads-item > .h-threads-item-replys, script[src$="/h.desktop.js"]', + insertPosition: ['css;.h-threads-list > .h-threads-item', 3], + replaceE: '//ul[contains(@class, "pagination")]', + scriptType: 3, + scrollDelta: 1500 + } + }, // A 岛 - 帖子内 + adnmb3_mf: { + SiteTypeID: 0, + pager: { + type: 1, + nextLink: '//li[contains(@class, "pagination-next")]//a[contains(text(), "下一页")]', + pageElement: 'css;.h-middle > div[id^="threads_"], .h-middle > hr.h-middle > div[id^="threads_"], .h-middle > hr:nth-of-type(n+2), script[src$="/h.mobile.js"]', + insertPosition: ['css;#h-threads-pagination', 1], + replaceE: 'css;#h-threads-pagination', + scriptType: 3, + scrollDelta: 1500 + } + }, // A 岛 - 帖子列表(手机版) + adnmb3_mt: { + SiteTypeID: 0, + pager: { + type: 1, + nextLink: '//li[contains(@class, "pagination-next")]//a[contains(text(), "下一页")]', + pageElement: 'css;.h-threads-replylist > div, script[src$="/h.mobile.js"]', + insertPosition: ['css;.h-threads-replylist', 3], + replaceE: 'css;#h-threads-pagination', + scriptType: 3, + scrollDelta: 1500 + } + }, // A 岛 - 帖子内(手机版) nga_thread: { SiteTypeID: 0, host: ['bbs.nga.cn', 'ngabbs.com', 'nga.178.com', 'g.nga.cn'], From cf8a1bb5052eeb0502ee611cd18e183b86dfed9f Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Fri, 24 Sep 2021 16:56:31 +0800 Subject: [PATCH 0007/1810] =?UTF-8?q?=E4=BC=98=E5=8C=96=20=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=EF=BC=88=E9=92=88=E5=AF=B9=20pjax=20=E7=BD=91?= =?UTF-8?q?=E9=A1=B5=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Autopage.user.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Autopage.user.js b/Autopage.user.js index e33fa669e..85e7dcccf 100644 --- a/Autopage.user.js +++ b/Autopage.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 自动无缝翻页 -// @version 2.4.7 +// @version 2.4.8 // @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 *://*/* @@ -2358,6 +2358,7 @@ curSite = DBSite.github_star; } else if (location.pathname.indexOf('/issues') > -1 && location.pathname.indexOf('/issues/') === -1) { curSite = DBSite.github_issues; + console.log(1111111111) } else if (location.pathname === '/search') { if (!location.search) return if (location.search.indexOf('type=Repositories') > -1 || location.search.indexOf('type=') === -1) { @@ -2386,7 +2387,7 @@ pageElement: 'css;#js-pjax-container .position-relative div[class^="col-lg-"] > div:not(.position-relative):not(.paginate-container)', insertPosition: ['css;.paginate-container', 1], replaceE: 'css;.paginate-container', - scrollDelta: 2500 + scrollDelta: 3000 } }, // Github - 用户 Star 列表 github_issues: { @@ -2397,7 +2398,7 @@ pageElement: 'css;.js-navigation-container.js-active-navigation-container > div[id^="issue_"]', insertPosition: ['css;.js-navigation-container.js-active-navigation-container', 3], replaceE: 'css;.pagination', - scrollDelta: 2000 + scrollDelta: 3000 } }, // Github - Issues 列表 github_search: { @@ -2898,6 +2899,7 @@ nowLocation = location.href; curSite = {SiteTypeID: 0}; pageNum.now = 1; // 重置规则+页码 registerMenuCommand(); // 重新判断规则 curSite.pageUrl = ''; // 下一页URL + pageLoading(); // 自动无缝翻页 if (GM_getValue('menu_page_number')) {pageNumber('add');} else {pageNumber('set');} // 显示页码 pausePageEvent(); // 左键双击网页空白处暂停翻页 From 7f17f8295004ca0113687bfc94c6920a868fab85 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Sat, 25 Sep 2021 11:51:49 +0800 Subject: [PATCH 0008/1810] =?UTF-8?q?=E4=BC=98=E5=8C=96=20[Flarum]=20?= =?UTF-8?q?=E9=80=9A=E7=94=A8=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Autopage.user.js | 50 +++++++++++++++++++++++++++++++----------------- 1 file changed, 32 insertions(+), 18 deletions(-) diff --git a/Autopage.user.js b/Autopage.user.js index 85e7dcccf..b8c976c8c 100644 --- a/Autopage.user.js +++ b/Autopage.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 自动无缝翻页 -// @version 2.4.8 +// @version 2.4.9 // @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 *://*/* @@ -186,9 +186,11 @@ }, // Discuz! - 淘帖页 flarum: { SiteTypeID: 0, + functionStart: function() {locationchange = true;console.log(location.pathname.indexOf('/d/'));if (location.pathname.indexOf('/d/') === -1) {console.log(111);curSite = DBSite.flarum;}}, pager: { type: 2, nextLink: '.DiscussionList-loadMore > button[title]', + intervals: 500, scrollDelta: 1000 } }, @@ -2880,7 +2882,7 @@ } // < 所有 Flarum 论坛 > } else if (webType === 3) { - curSite = DBSite.flarum; + DBSite.flarum.functionStart() // < 所有使用 WordPress DUX 主题的网站 > } else if (webType === 4) { if (location.pathname.indexOf('.html') === -1) curSite = DBSite.dux; @@ -2894,17 +2896,30 @@ if (locationchange) { // 对于使用 pjax 技术的网站,需要监听 URL 变化来重新判断翻页规则 nowLocation = location.href addLocationchange(); // 自定义 locationchange 事件 - window.addEventListener('locationchange', function(){ - if (nowLocation != location.href) { - nowLocation = location.href; curSite = {SiteTypeID: 0}; pageNum.now = 1; // 重置规则+页码 - registerMenuCommand(); // 重新判断规则 - curSite.pageUrl = ''; // 下一页URL - pageLoading(); // 自动无缝翻页 - - if (GM_getValue('menu_page_number')) {pageNumber('add');} else {pageNumber('set');} // 显示页码 - pausePageEvent(); // 左键双击网页空白处暂停翻页 - } - }) + if (webType === 1) { + window.addEventListener('locationchange', function(){ + if (nowLocation != location.href) { + nowLocation = location.href; curSite = {SiteTypeID: 0}; pageNum.now = 1; // 重置规则+页码 + registerMenuCommand(); // 重新判断规则 + curSite.pageUrl = ''; // 下一页URL + pageLoading(); // 自动无缝翻页 + + if (GM_getValue('menu_page_number')) {pageNumber('add');} else {pageNumber('set');} // 显示页码 + pausePageEvent(); // 左键双击网页空白处暂停翻页 + } + }) + } else if (webType === 3) { + window.addEventListener('locationchange', function(){ + if (nowLocation != location.href) { + nowLocation = location.href; curSite = {SiteTypeID: 0}; pageNum.now = 1; // 重置规则+页码 + DBSite.flarum.functionStart(); // 重新判断规则 + pageLoading(); // 自动无缝翻页 + + if (GM_getValue('menu_page_number')) {pageNumber('add');} else {pageNumber('set');} // 显示页码 + pausePageEvent(); // 左键双击网页空白处暂停翻页 + } + }) + } } curSite.pageUrl = ''; // 下一页URL @@ -3768,11 +3783,10 @@ if (autopbn.innerHTML === curSite.pager.nextHTML) {autopbn.click(); pageNum.now = pageNum._now + 1;} // 当前页码 + 1 } else { // 如果没有指定按钮文字就直接点击 autopbn.click(); pageNum.now = pageNum._now + 1; // 当前页码 + 1 - // 对于没有按钮文字变化的按钮,可以手动指定间隔时间 - if (curSite.pager.intervals) { - let _SiteTypeID = curSite.SiteTypeID; curSite.SiteTypeID = 0; - setTimeout(function(){curSite.SiteTypeID = _SiteTypeID;}, curSite.pager.intervals) - } + // 对于没有按钮文字变化的按钮,可以指定间隔时间(默认 300ms) + if (!curSite.pager.intervals) {curSite.pager.intervals = 300;} + let _SiteTypeID = curSite.SiteTypeID; curSite.SiteTypeID = 0; + setTimeout(function(){curSite.SiteTypeID = _SiteTypeID;}, curSite.pager.intervals) } } } From 0e1c38f731edf0265d1c20c76af8c2fc203da8dc Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Sat, 25 Sep 2021 22:15:35 +0800 Subject: [PATCH 0009/1810] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20[ZzzFun=20?= =?UTF-8?q?=E5=8A=A8=E6=BC=AB=E3=80=81YYDS=20=E7=94=B5=E5=BD=B1]=20?= =?UTF-8?q?=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Autopage.user.js | 167 +++++++++++++++++++++++++++++++---------------- 1 file changed, 109 insertions(+), 58 deletions(-) diff --git a/Autopage.user.js b/Autopage.user.js index b8c976c8c..fdc4336e6 100644 --- a/Autopage.user.js +++ b/Autopage.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 自动无缝翻页 -// @version 2.4.9 +// @version 2.5.0 // @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 *://*/* @@ -220,7 +220,7 @@ replaceE: 'css;#page', scrollDelta: 1200 } - }, // 百度搜素 + }, // 百度搜素 google: { SiteTypeID: 0, host: /.google./, @@ -234,7 +234,7 @@ scriptType: 1, scrollDelta: 3000 } - }, // 谷歌搜索 + }, // 谷歌搜索 bing: { SiteTypeID: 0, host: ['www.bing.com','cn.bing.com'], @@ -247,7 +247,7 @@ replaceE: 'css;#b_results > .b_pag', scrollDelta: 1500 } - }, // 必应搜索 + }, // 必应搜索 yandex: { SiteTypeID: 0, host: 'yandex.com', @@ -260,7 +260,7 @@ replaceE: 'css;.pager', scrollDelta: 1500 } - }, // Yandex 搜索 + }, // Yandex 搜索 toutiao: { SiteTypeID: 0, host: ['www.toutiao.com', 'so.toutiao.com'], @@ -276,7 +276,7 @@ function: { before: toutiao_functionBefore } - }, // 头条搜索 + }, // 头条搜索 sogou: { SiteTypeID: 0, host: 'www.sogou.com', @@ -290,7 +290,7 @@ scriptType: 4, scrollDelta: 1200 } - }, // 搜狗搜索 + }, // 搜狗搜索 sogou_weixin: { SiteTypeID: 0, host: 'weixin.sogou.com', @@ -305,7 +305,7 @@ intervals: 1000, scrollDelta: 1000 } - }, // 搜狗微信 - 首页 + }, // 搜狗微信 - 首页 sogou_weixin_search: { SiteTypeID: 0, pager: { @@ -316,7 +316,7 @@ replaceE: 'css;#pagebar_container', scrollDelta: 1000 } - }, //搜狗微信 - 搜索 + }, // 搜狗微信 - 搜索 so: { SiteTypeID: 0, host: 'www.so.com', @@ -332,7 +332,7 @@ function: { before: so_functionBefore } - }, // 360 搜索 + }, // 360 搜索 magi: { SiteTypeID: 0, host: 'magi.com', @@ -343,7 +343,7 @@ nextText: '加载更多', scrollDelta: 1500 } - }, // Magi搜索 + }, // Magi搜索 baidu_tieba: { SiteTypeID: 0, host: 'tieba.baidu.com', @@ -810,7 +810,7 @@ replaceE: 'css;.pagination, .b2-pagenav.post-nav', scrollDelta: 1500 } - }, // 致美化 + }, // 致美化 zhutix_postlist: { SiteTypeID: 0, pager: { @@ -821,7 +821,7 @@ replaceE: 'css;.pagination', scrollDelta: 1500 } - }, // 致美化 - 文章列表 + }, // 致美化 - 文章列表 jandan: { SiteTypeID: 0, host: 'jandan.net', @@ -843,7 +843,7 @@ function: { before: src_original_functionBefore } - }, // 煎蛋网 + }, // 煎蛋网 jandan_comment: { SiteTypeID: 0, pager: { @@ -855,7 +855,7 @@ scriptType: 3, scrollDelta: 1500 } - }, // 煎蛋网 + }, // 煎蛋网 jandan_dzh: { SiteTypeID: 0, pager: { @@ -864,7 +864,7 @@ intervals: 1500, scrollDelta: 1500 } - }, // 煎蛋网 - 大杂烩 + }, // 煎蛋网 - 大杂烩 guokr: { SiteTypeID: 0, host: 'www.guokr.com', @@ -874,7 +874,7 @@ intervals: 1500, scrollDelta: 1500 } - }, // 果壳网 + }, // 果壳网 expreview: { SiteTypeID: 0, host: 'www.expreview.com', @@ -884,7 +884,7 @@ intervals: 1500, scrollDelta: 1500 } - }, // 超能网 + }, // 超能网 landian: { SiteTypeID: 0, host: 'www.landian.vip', @@ -894,7 +894,7 @@ nextText: '加载更多', scrollDelta: 1300 } - }, // 蓝点网 + }, // 蓝点网 ithome: { SiteTypeID: 0, host: 'www.ithome.com', @@ -904,7 +904,7 @@ intervals: 1500, scrollDelta: 1500 } - }, // IT 之家 + }, // IT 之家 puxiang: { SiteTypeID: 0, host: 'www.puxiang.com', @@ -923,7 +923,7 @@ replaceE: 'css;.pagerbar', scrollDelta: 1500 } - }, // 普象网 - 作品集/搜索页 + }, // 普象网 - 作品集/搜索页 puxiang_collect: { SiteTypeID: 0, pager: { @@ -934,7 +934,7 @@ replaceE: 'css;.pagerbar', scrollDelta: 1500 } - }, // 普象网 - 收藏夹 + }, // 普象网 - 收藏夹 om: { SiteTypeID: 0, host: 'www.om.cn', @@ -947,7 +947,7 @@ replaceE: 'css;ul.pagination', scrollDelta: 1500 } - }, // 欧模网 + }, // 欧模网 _58pic: { SiteTypeID: 0, host: 'www.58pic.com', @@ -968,7 +968,7 @@ function: { before: _58pic_functionBefore } - }, // 千图网 - 分类/搜索页 + }, // 千图网 - 分类/搜索页 _58pic_c: { SiteTypeID: 0, pager: { @@ -982,7 +982,7 @@ function: { before: _58pic_functionBefore } - }, // 千图网 - 专题/收藏夹 + }, // 千图网 - 专题/收藏夹 logosc: { SiteTypeID: 0, host: 'www.logosc.cn', @@ -993,7 +993,7 @@ intervals: 1500, scrollDelta: 1500 } - }, // 搜图神器 (免费无版权) + }, // 搜图神器 (免费无版权) pixabay: { SiteTypeID: 0, host: 'pixabay.com', @@ -1225,7 +1225,7 @@ function: { before: mypianku_functionBefore } - }, // 片库 + }, // 片库 cupfox: { SiteTypeID: 0, host: 'www.cupfox.com', @@ -1235,7 +1235,7 @@ nextText: '点击加载更多', scrollDelta: 700 } - }, // 茶杯狐 + }, // 茶杯狐 novipnoad: { SiteTypeID: 0, host: 'www.novipnoad.com', @@ -1251,7 +1251,7 @@ function: { before: src_original_functionBefore } - }, // NO视频 + }, // NO视频 nfmovies: { SiteTypeID: 0, host: 'www.nfmovies.com', @@ -1267,7 +1267,7 @@ function: { before: nfmovies_functionBefore } - }, // 奈菲影视 + }, // 奈菲影视 ddrk: { SiteTypeID: 0, host: 'ddrk.me', @@ -1280,7 +1280,7 @@ replaceE: 'css;.pagination_wrap', scrollDelta: 1500 } - }, // 低端影视 + }, // 低端影视 zxzj: { SiteTypeID: 0, host: 'www.zxzj.me', @@ -1298,7 +1298,7 @@ function: { before: nfmovies_functionBefore } - }, // 在线之家 + }, // 在线之家 zhenbuka: { SiteTypeID: 0, host: ['www.zhenbuka3.com', 'www.zhenbuka5.com'], @@ -1314,7 +1314,7 @@ function: { before: nfmovies_functionBefore } - }, // 真不卡影院 + }, // 真不卡影院 _91mjw: { SiteTypeID: 0, host: '91mjw.com', @@ -1330,7 +1330,7 @@ function: { before: src_original_functionBefore } - }, // 91 美剧网 + }, // 91 美剧网 agefans: { SiteTypeID: 0, host: 'www.agefans.cc', @@ -1349,7 +1349,7 @@ replaceE: 'css;#container .blockcontent > div[style]:not([class])', scrollDelta: 1000 } - }, // AGE 动漫 - 全部/搜索 + }, // AGE 动漫 - 全部/搜索 agefans_: { SiteTypeID: 0, pager: { @@ -1360,7 +1360,7 @@ replaceE: 'css;#container .blockcontent > div[style]:not([class])', scrollDelta: 1000 } - }, // AGE 动漫 - 其他页 + }, // AGE 动漫 - 其他页 agefans_rank: { SiteTypeID: 0, pager: { @@ -1371,7 +1371,7 @@ replaceE: 'css;#container > ul[style]:not([class])', scrollDelta: 1000 } - }, //AGE 动漫 - 排行榜 + }, // AGE 动漫 - 排行榜 yhdm: { SiteTypeID: 0, host: 'www.imomoe.la', @@ -1389,7 +1389,7 @@ mimeType: 'text/html; charset=gb2312', scrollDelta: 1000 } - }, // 樱花动漫 + }, // 樱花动漫 yhdm_: { SiteTypeID: 0, pager: { @@ -1401,7 +1401,42 @@ mimeType: 'text/html; charset=gb2312', scrollDelta: 1000 } - }, // 樱花动漫 - 搜索页等 + }, // 樱花动漫 - 搜索页等 + zzzfun: { + SiteTypeID: 0, + host: 'www.zzzfun.com', + functionStart: function() { + if (location.pathname.indexOf('/vod_type') > -1 || location.pathname.indexOf('/vod_show') > -1) { + curSite = DBSite.zzzfun; + } else if (location.pathname.indexOf('/vod_search') > -1) { + curSite = DBSite.zzzfun_search; + }}, + pager: { + type: 1, + nextLink: 'css;#page a[title="下一页"]', + pageElement: 'css;ul.search-result > a', + insertPosition: ['css;ul.search-result', 3], + replaceE: 'css;#page', + scrollDelta: 1000 + }, + function: { + before: src_original_functionBefore + } + }, // ZzzFun 动漫 + zzzfun_search: { + SiteTypeID: 0, + pager: { + type: 1, + nextLink: 'css;#page a[title="下一页"]', + pageElement: 'css;ul.show-list > li', + insertPosition: ['css;ul.show-list', 3], + replaceE: 'css;#page', + scrollDelta: 1000 + }, + function: { + before: src_original_functionBefore + } + }, // ZzzFun 动漫 - 搜索页 yinfans: { SiteTypeID: 0, host: 'www.yinfans.net', @@ -1414,7 +1449,7 @@ replaceE: 'css;.pagination', scrollDelta: 1500 } - }, // 音范丝 + }, // 音范丝 btbtt: { SiteTypeID: 0, host: /btbtt/, @@ -1426,7 +1461,7 @@ replaceE: 'css;.page', scrollDelta: 2000 } - }, // BT 之家 + }, // BT 之家 bdys: { SiteTypeID: 0, host: 'www.bd2020.com', @@ -1437,7 +1472,7 @@ nextText: '加载更多', scrollDelta: 1000 } - }, // BD 影视 + }, // BD 影视 gaoqing_fm: { SiteTypeID: 0, host: 'gaoqing.fm', @@ -1447,7 +1482,23 @@ intervals: 1500, scrollDelta: 1000 } - }, // 高清电台 + }, // 高清电台 + yyds: { + SiteTypeID: 0, + host: 'yyds.fans', + functionStart: function() { + if (location.search != '' && location.search.indexOf('p=') === -1) { + curSite = DBSite.yyds; + }}, + pager: { + type: 1, + nextLink: 'css;a.next.page-numbers[href]', + pageElement: 'css;.list-grouped > div', + insertPosition: ['css;.list-grouped', 3], + replaceE: 'css;nav.pagination', + scrollDelta: 1100 + } + }, // YYDS 电影 kisssub: { SiteTypeID: 0, host: 'www.kisssub.org', @@ -1459,7 +1510,7 @@ replaceE: 'css;.pages', scrollDelta: 2500 } - }, // 爱恋动漫 + }, // 爱恋动漫 dmhy: { SiteTypeID: 0, host: ['share.dmhy.org', 'dmhy.anoneko.com'], @@ -1474,7 +1525,7 @@ function: { after: function() {document.body.appendChild(document.createElement('script')).textContent = `$('#topic_list > tbody > tr:even:not(.even):not(.odd)').addClass('even'); $('#topic_list > tbody > tr:odd:not(.even):not(.odd)').addClass('odd');`;} } - }, // 动漫花园 + }, // 动漫花园 futaacg: { SiteTypeID: 0, host: 'futaacg.com', @@ -1486,7 +1537,7 @@ replaceE: 'css;ul.pagination', scrollDelta: 1500 } - }, // 扶她动漫 + }, // 扶她动漫 bangumi: { SiteTypeID: 0, host: 'bangumi.moe', @@ -1496,7 +1547,7 @@ intervals: 1000, scrollDelta: 1500 } - }, // 萌番组 + }, // 萌番组 nyaa: { SiteTypeID: 0, host: 'nyaa.si', @@ -1508,7 +1559,7 @@ replaceE: 'css;ul.pagination', scrollDelta: 2000 } - }, // Nyaa + }, // Nyaa skrbt: { SiteTypeID: 0, host: /skrbt/, @@ -1521,7 +1572,7 @@ replaceE: 'css;ul.pagination', scrollDelta: 900 } - }, // SkrBT + }, // SkrBT rarbgprx: { SiteTypeID: 0, host: /rarbg/, @@ -1534,7 +1585,7 @@ replaceE: 'css;#pager_links', scrollDelta: 1000 } - }, // RARBG + }, // RARBG subdh: { SiteTypeID: 0, host: 'subdh.com', @@ -1551,7 +1602,7 @@ replaceE: 'css;ul.pagination', scrollDelta: 1000 } - }, // SubDH + }, // SubDH subdh_search: { SiteTypeID: 0, pager: { @@ -1562,7 +1613,7 @@ replaceE: 'css;ul.pagination', scrollDelta: 1000 } - }, //SubDH - 搜索页 + }, // SubDH - 搜索页 mini4k: { SiteTypeID: 0, host: 'www.mini4k.com', @@ -1575,7 +1626,7 @@ replaceE: 'css;.pagination', scrollDelta: 2000 } - }, // MINI4K + }, // MINI4K bthaha: { SiteTypeID: 0, host: /bthaha/, @@ -1595,7 +1646,7 @@ function: { before: bthaha_functionBefore } - }, // BTHaha + }, // BTHaha a4k: { SiteTypeID: 0, host: 'www.a4k.net', @@ -1608,7 +1659,7 @@ replaceE: 'css;.pagination', scrollDelta: 1000 } - }, // A4k 字幕网(字幕) + }, // A4k 字幕网(字幕) assrt: { SiteTypeID: 0, host: 'assrt.net', @@ -1621,7 +1672,7 @@ replaceE: 'css;.pagelinkcard', scrollDelta: 1000 } - }, // 射手网(字幕) + }, // 射手网(字幕) subhd: { SiteTypeID: 0, host: 'subhd.tv', @@ -1638,7 +1689,7 @@ replaceE: 'css;nav.clearfix', scrollDelta: 1000 } - }, // SubHD(字幕) + }, // SubHD(字幕) subhd_forum: { SiteTypeID: 0, pager: { @@ -1649,7 +1700,7 @@ replaceE: 'css;nav.clearfix', scrollDelta: 800 } - }, // SubHD - forum(字幕) + }, // SubHD - forum(字幕) baoshuu: { SiteTypeID: 0, host: 'www.baoshuu.com', From 6bde9e7654093d555032ae5777ceb6d5088176f6 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Sat, 25 Sep 2021 22:24:07 +0800 Subject: [PATCH 0010/1810] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20[=E7=89=87?= =?UTF-8?q?=E5=BA=93]=20=E5=85=B6=E4=BB=96=E5=9F=9F=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Autopage.user.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Autopage.user.js b/Autopage.user.js index fdc4336e6..b137a7adc 100644 --- a/Autopage.user.js +++ b/Autopage.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 自动无缝翻页 -// @version 2.5.0 +// @version 2.5.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 *://*/* @@ -1211,9 +1211,10 @@ scrollDelta: 2000 } }, - mypianku: { + pianku: { SiteTypeID: 0, - host: 'www.mypianku.net', + host: ['www.pianku.li', 'www.mypianku.net'], + functionStart: function() {if (location.pathname != '/') {curSite = DBSite.pianku;}}, pager: { type: 1, nextLink: 'css;a.a1[href]', @@ -1223,7 +1224,7 @@ scrollDelta: 1500 }, function: { - before: mypianku_functionBefore + before: pianku_functionBefore } }, // 片库 cupfox: { @@ -3296,7 +3297,7 @@ // [片库] 的插入前函数(加载图片) - function mypianku_functionBefore(pageElems) { + function pianku_functionBefore(pageElems) { pageElems.forEach(function (one) { let now = one.querySelector('img') if (now) { From 38b5bcea2de336527982b89ff09e43b8e012b83d Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Sat, 25 Sep 2021 22:25:24 +0800 Subject: [PATCH 0011/1810] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20[=E7=89=87?= =?UTF-8?q?=E5=BA=93]=20=E5=85=B6=E4=BB=96=E5=9F=9F=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Autopage.user.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Autopage.user.js b/Autopage.user.js index b137a7adc..61ab1bdc2 100644 --- a/Autopage.user.js +++ b/Autopage.user.js @@ -1213,7 +1213,7 @@ }, pianku: { SiteTypeID: 0, - host: ['www.pianku.li', 'www.mypianku.net'], + host: /pianku/, functionStart: function() {if (location.pathname != '/') {curSite = DBSite.pianku;}}, pager: { type: 1, From 9fd03a931d4009e8b84f9e3f4701dd40cba28a3d Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Sun, 26 Sep 2021 15:08:56 +0800 Subject: [PATCH 0012/1810] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20[=E4=B8=80?= =?UTF-8?q?=E9=94=AE=E6=94=B6=E8=B5=B7=E5=9B=9E=E7=AD=94]=20=E5=AF=BC?= =?UTF-8?q?=E8=87=B4=E9=A6=96=E9=A1=B5=E5=BC=82=E5=B8=B8=E6=94=B6=E8=B5=B7?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Zhihu-Enhanced.user.js | 50 ++++++++++++++++++++++++------------------ 1 file changed, 29 insertions(+), 21 deletions(-) diff --git a/Zhihu-Enhanced.user.js b/Zhihu-Enhanced.user.js index cde5eb49f..c8b71555c 100644 --- a/Zhihu-Enhanced.user.js +++ b/Zhihu-Enhanced.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 知乎增强 -// @version 1.7.5 +// @version 1.7.6 // @author X.I.U // @description 移除登录弹窗、默认收起回答、一键收起回答、收起当前回答/评论(点击两侧空白处)、快捷回到顶部(右键两侧空白处)、屏蔽用户 (发布的内容)、屏蔽关键词(标题/评论)、屏蔽指定类别(视频/文章等)、屏蔽盐选内容、净化标题消息、展开问题描述、置顶显示时间、完整问题时间、区分问题文章、直达问题按钮、默认高清原图、默认站外直链 // @match *://www.zhihu.com/* @@ -194,29 +194,37 @@ function collapsedAnswer() { document.head.appendChild(document.createElement('style')).textContent = '.CornerButton{margin-bottom:8px !important;}.CornerButtons{bottom:45px !important;}'; document.querySelector('.CornerAnimayedFlex').insertAdjacentHTML('afterBegin', ''); document.getElementById('collapsed-button').onclick = function () { - document.querySelectorAll('[script-collapsed]').forEach(function(scriptCollapsed) { - scriptCollapsed.querySelectorAll('.ContentItem-actions [data-zop-retract-question], .ContentItem-actions.Sticky [data-zop-retract-question]').forEach(function(button) { + if (location.pathname === '/' || location.pathname === '/hot' || location.pathname === '/follow') { + document.querySelectorAll('.ContentItem-rightButton').forEach(function (el) { + if (el.hasAttribute('data-zop-retract-question')) { + el.click() + } + }); + } else { + document.querySelectorAll('[script-collapsed]').forEach(function(scriptCollapsed) { + scriptCollapsed.querySelectorAll('.ContentItem-actions [data-zop-retract-question], .ContentItem-actions.Sticky [data-zop-retract-question]').forEach(function(button) { + button.click(); + }) + }) + document.querySelectorAll('.RichContent:not([script-collapsed]) .ContentItem-actions.Sticky [data-zop-retract-question]').forEach(function(button) { + let el = button.parentElement; + while (!el.classList.contains('RichContent')) { + el = el.parentElement; + } + if (el) { + el.setAttribute('script-collapsed', ''); + } button.click(); }) - }) - document.querySelectorAll('.RichContent:not([script-collapsed]) .ContentItem-actions.Sticky [data-zop-retract-question]').forEach(function(button) { - let el = button.parentElement; - while (!el.classList.contains('RichContent')) { - el = el.parentElement; - } - if (el) { - el.setAttribute('script-collapsed', ''); + const observer = getCollapsedAnswerObserver(); + observer.start(); + if (!menu_value('menu_defaultCollapsedAnswer') && !observer._disconnectListener) { + window.addEventListener('locationchange', function() { + observer.end(); + window._collapsedAnswerObserver = null; + }) + observer._disconnectListener = true; } - button.click(); - }) - const observer = getCollapsedAnswerObserver(); - observer.start(); - if (!menu_value('menu_defaultCollapsedAnswer') && !observer._disconnectListener) { - window.addEventListener('locationchange', function() { - observer.end(); - window._collapsedAnswerObserver = null; - }) - observer._disconnectListener = true; } } } From 2fcd0a837098b3a855810b8d9e264743d12c4ca8 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Sun, 26 Sep 2021 15:25:23 +0800 Subject: [PATCH 0013/1810] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20[Github=20Pull?= =?UTF-8?q?=20requests=E3=80=81Discussions]=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 | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/Autopage.user.js b/Autopage.user.js index 61ab1bdc2..188e1848c 100644 --- a/Autopage.user.js +++ b/Autopage.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 自动无缝翻页 -// @version 2.5.1 +// @version 2.5.2 // @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 *://*/* @@ -2410,9 +2410,10 @@ functionStart: function() {locationchange = true; if (location.search.indexOf('tab=stars') > -1) { curSite = DBSite.github_star; - } else if (location.pathname.indexOf('/issues') > -1 && location.pathname.indexOf('/issues/') === -1) { + } else if ((location.pathname.indexOf('/issues') > -1 && location.pathname.indexOf('/issues/') === -1) || (location.pathname.indexOf('/pulls') > -1 && location.pathname.indexOf('/pulls/') === -1)) { curSite = DBSite.github_issues; - console.log(1111111111) + } else if (location.pathname.indexOf('/discussions') > -1 && !(/\/discussions\/\d+/.test(location.pathname))) { + curSite = DBSite.github_discussions; } else if (location.pathname === '/search') { if (!location.search) return if (location.search.indexOf('type=Repositories') > -1 || location.search.indexOf('type=') === -1) { @@ -2454,7 +2455,18 @@ replaceE: 'css;.pagination', scrollDelta: 3000 } - }, // Github - Issues 列表 + }, // Github - Issues 列表 / PR 列表 + github_discussions: { + SiteTypeID: 0, + pager: { + type: 1, + nextLink: 'css;a.next_page', + pageElement: 'css;#repo-content-pjax-container div[data-discussion-hovercards-enabled] > div', + insertPosition: ['css;#repo-content-pjax-container div[data-discussion-hovercards-enabled]', 3], + replaceE: 'css;.pagination', + scrollDelta: 3000 + } + }, // Github - Discussions 列表 github_search: { SiteTypeID: 0, pager: { From aa2bf201aab9b356b898b5e8c8ae5d7e5444f6a4 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Sun, 26 Sep 2021 15:53:20 +0800 Subject: [PATCH 0014/1810] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20[DuckDuckGo]=20?= =?UTF-8?q?=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Autopage.user.js | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/Autopage.user.js b/Autopage.user.js index 188e1848c..f763419d4 100644 --- a/Autopage.user.js +++ b/Autopage.user.js @@ -1,8 +1,8 @@ // ==UserScript== // @name 自动无缝翻页 -// @version 2.5.2 +// @version 2.5.3 // @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(以上仅一部分,更多的写不下了... +// @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 *://*/* // @connect www.gamersky.com // @icon https://i.loli.net/2021/03/07/rdijeYm83pznxWq.png @@ -220,7 +220,7 @@ replaceE: 'css;#page', scrollDelta: 1200 } - }, // 百度搜素 + }, // 百度 搜素 google: { SiteTypeID: 0, host: /.google./, @@ -234,7 +234,7 @@ scriptType: 1, scrollDelta: 3000 } - }, // 谷歌搜索 + }, // 谷歌 搜索 bing: { SiteTypeID: 0, host: ['www.bing.com','cn.bing.com'], @@ -247,7 +247,7 @@ replaceE: 'css;#b_results > .b_pag', scrollDelta: 1500 } - }, // 必应搜索 + }, // 必应 搜索 yandex: { SiteTypeID: 0, host: 'yandex.com', @@ -276,7 +276,7 @@ function: { before: toutiao_functionBefore } - }, // 头条搜索 + }, // 头条 搜索 sogou: { SiteTypeID: 0, host: 'www.sogou.com', @@ -290,7 +290,7 @@ scriptType: 4, scrollDelta: 1200 } - }, // 搜狗搜索 + }, // 搜狗 搜索 sogou_weixin: { SiteTypeID: 0, host: 'weixin.sogou.com', @@ -343,7 +343,17 @@ nextText: '加载更多', scrollDelta: 1500 } - }, // Magi搜索 + }, // Magi 搜索 + duckduckgo: { + SiteTypeID: 0, + host: 'duckduckgo.com', + functionStart: function() { + if (getCookie('av') != '1') { + document.cookie='av=1; expires=Thu, 18 Dec 2031 12:00:00 GMT; path=/'; // 写入 Cookie 强制开启自带的无缝翻页功能 + location.reload(); // 刷新网页 + } + }, + }, // DuckDuckGo 搜索 baidu_tieba: { SiteTypeID: 0, host: 'tieba.baidu.com', From 3404b242e38d47b0a1d4eb6d61c02b52638f8b8f Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Sun, 26 Sep 2021 16:37:58 +0800 Subject: [PATCH 0015/1810] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20[233=20=E5=8A=A8?= =?UTF-8?q?=E6=BC=AB]=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 | 45 +++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 43 insertions(+), 2 deletions(-) diff --git a/Autopage.user.js b/Autopage.user.js index f763419d4..eb20998e3 100644 --- a/Autopage.user.js +++ b/Autopage.user.js @@ -1,8 +1,8 @@ // ==UserScript== // @name 自动无缝翻页 -// @version 2.5.3 +// @version 2.5.4 // @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(以上仅一部分,更多的写不下了... +// @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 *://*/* // @connect www.gamersky.com // @icon https://i.loli.net/2021/03/07/rdijeYm83pznxWq.png @@ -1342,6 +1342,47 @@ before: src_original_functionBefore } }, // 91 美剧网 + dm233: { + SiteTypeID: 0, + host: 'www.dm233.cc', + functionStart: function() {if (location.pathname.indexOf('/catalog/') > -1 || location.pathname === '/recommend/' || location.pathname === '/search') { + curSite = DBSite.dm233; + } else if (location.pathname === '/article/') { + curSite = DBSite.dm233_article; + } else if (location.pathname === '/rank/') { + curSite = DBSite.dm233_rank; + }}, + pager: { + type: 1, + nextLink: '//div[@class="pagelist"]//a[contains(text(), "下一页") or contains(text(), "下一頁")]', + pageElement: 'css;.dhnew ul > li', + insertPosition: ['css;.dhnew ul', 3], + replaceE: 'css;.pagelist', + scrollDelta: 1000 + } + }, // 233 动漫 + dm233_article: { + SiteTypeID: 0, + pager: { + type: 1, + nextLink: '//div[@class="pagelist"]//a[contains(text(), "下一页") or contains(text(), "下一頁")]', + pageElement: 'css;.xgyd ul > li', + insertPosition: ['css;.xgyd ul', 3], + replaceE: 'css;.pagelist', + scrollDelta: 1000 + } + }, // 233 动漫 - 动漫情报/资讯 + dm233_rank: { + SiteTypeID: 0, + pager: { + type: 1, + nextLink: '//div[@class="pagelist"]//a[contains(text(), "下一页") or contains(text(), "下一頁")]', + pageElement: 'css;.side-update.normal-wai > .normal-nei', + insertPosition: ['css;.side-update.normal-wai', 3], + replaceE: 'css;.pagelist', + scrollDelta: 1000 + } + }, // 233 动漫 - 排行榜 agefans: { SiteTypeID: 0, host: 'www.agefans.cc', From 803b897a359cc319cff3261743963678075598b3 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Sun, 26 Sep 2021 20:59:31 +0800 Subject: [PATCH 0016/1810] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20description?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Zhihu-Enhanced.user.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Zhihu-Enhanced.user.js b/Zhihu-Enhanced.user.js index c8b71555c..4b5815380 100644 --- a/Zhihu-Enhanced.user.js +++ b/Zhihu-Enhanced.user.js @@ -2,7 +2,7 @@ // @name 知乎增强 // @version 1.7.6 // @author X.I.U -// @description 移除登录弹窗、默认收起回答、一键收起回答、收起当前回答/评论(点击两侧空白处)、快捷回到顶部(右键两侧空白处)、屏蔽用户 (发布的内容)、屏蔽关键词(标题/评论)、屏蔽指定类别(视频/文章等)、屏蔽盐选内容、净化标题消息、展开问题描述、置顶显示时间、完整问题时间、区分问题文章、直达问题按钮、默认高清原图、默认站外直链 +// @description 移除登录弹窗、默认收起回答、一键收起回答、收起当前回答/评论(点击两侧空白处)、快捷回到顶部(右键两侧空白处)、屏蔽用户 (发布的内容)、屏蔽关键词(标题/评论)、屏蔽首页视频(视频/文章等类别)、屏蔽盐选内容、净化标题消息、展开问题描述、置顶显示时间、完整问题时间、区分问题文章、直达问题按钮、默认高清原图、默认站外直链 // @match *://www.zhihu.com/* // @match *://zhuanlan.zhihu.com/* // @icon https://static.zhihu.com/heifetz/favicon.ico From e63f3d3b3a9146600a4e13565e5bdda74c5d1679 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Mon, 27 Sep 2021 09:37:03 +0800 Subject: [PATCH 0017/1810] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20[=E8=B0=B7?= =?UTF-8?q?=E6=AD=8C=E5=AD=A6=E6=9C=AF]=20=E6=94=AF=E6=8C=81;=20=E4=BC=98?= =?UTF-8?q?=E5=8C=96=20[Github=20=E6=90=9C=E7=B4=A2=E9=A1=B5]=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 | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/Autopage.user.js b/Autopage.user.js index eb20998e3..436f60e85 100644 --- a/Autopage.user.js +++ b/Autopage.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 自动无缝翻页 -// @version 2.5.4 +// @version 2.5.5 // @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 *://*/* @@ -224,7 +224,11 @@ google: { SiteTypeID: 0, host: /.google./, - functionStart: function() {if (location.pathname === '/search') curSite = DBSite.google;}, + functionStart: function() {if (location.pathname === '/search') { + curSite = DBSite.google; + } else if (location.pathname === '/scholar') { + curSite = DBSite.google_scholar; + }}, pager: { type: 1, nextLink: 'id("pnnext")[@href]', @@ -235,6 +239,18 @@ scrollDelta: 3000 } }, // 谷歌 搜索 + google_scholar: { + SiteTypeID: 0, + pager: { + type: 1, + nextLink: '//a[./span[@class="gs_ico gs_ico_nav_next"]]', + pageElement: 'css;#gs_res_ccl_mid > *', + insertPosition: ['css;#gs_res_ccl_mid', 3], + replaceE: 'id("gs_n")', + scriptType: 1, + scrollDelta: 2000 + } + }, // 谷歌学术 搜索 bing: { SiteTypeID: 0, host: ['www.bing.com','cn.bing.com'], @@ -1236,7 +1252,7 @@ function: { before: pianku_functionBefore } - }, // 片库 + }, // 片库 cupfox: { SiteTypeID: 0, host: 'www.cupfox.com', @@ -1360,7 +1376,7 @@ replaceE: 'css;.pagelist', scrollDelta: 1000 } - }, // 233 动漫 + }, // 233 动漫 dm233_article: { SiteTypeID: 0, pager: { @@ -1371,7 +1387,7 @@ replaceE: 'css;.pagelist', scrollDelta: 1000 } - }, // 233 动漫 - 动漫情报/资讯 + }, // 233 动漫 - 动漫情报/资讯 dm233_rank: { SiteTypeID: 0, pager: { @@ -1382,7 +1398,7 @@ replaceE: 'css;.pagelist', scrollDelta: 1000 } - }, // 233 动漫 - 排行榜 + }, // 233 动漫 - 排行榜 agefans: { SiteTypeID: 0, host: 'www.agefans.cc', @@ -2465,7 +2481,7 @@ curSite = DBSite.github_issues; } else if (location.pathname.indexOf('/discussions') > -1 && !(/\/discussions\/\d+/.test(location.pathname))) { curSite = DBSite.github_discussions; - } else if (location.pathname === '/search') { + } else if (location.pathname.indexOf('/search') > -1) { if (!location.search) return if (location.search.indexOf('type=Repositories') > -1 || location.search.indexOf('type=') === -1) { curSite = DBSite.github_search; From 62196220fdbb1dcde80544e15bb19fe864feb55d Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Mon, 27 Sep 2021 16:25:56 +0800 Subject: [PATCH 0018/1810] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20[Mangabz=20?= =?UTF-8?q?=E6=BC=AB=E7=94=BB]=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 | 113 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 111 insertions(+), 2 deletions(-) diff --git a/Autopage.user.js b/Autopage.user.js index 436f60e85..4f1ea0b84 100644 --- a/Autopage.user.js +++ b/Autopage.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 自动无缝翻页 -// @version 2.5.5 +// @version 2.5.6 // @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 *://*/* @@ -2441,6 +2441,39 @@ before: szcdmj_functionBefore } }, // 砂之船动漫家 + mangabz: { + SiteTypeID: 0, + host: 'mangabz.com', + functionStart: function() {if (/\/m\d+/.test(location.pathname)) { + setTimeout(mangabz_init, 500); + curSite = DBSite.mangabz; + document.lastElementChild.appendChild(document.createElement('style')).textContent = 'body > .container > div:not([id]) {display: none !important;} .top-bar {opacity: 0.3 !important;} #cp_img > img{display: block !important;margin: 0 auto !important;width: auto !important; height: auto !important;}'; + } else if (/\/\d+bz\//.test(location.pathname)) { + if (document.querySelector('.detail-list-form-more')) document.querySelector('.detail-list-form-more').click(); + } else if (location.pathname.indexOf('/manga-list') > -1 || location.pathname === '/search') { + curSite = DBSite.mangabz_list; + }}, + pager: { + type: 4, + nextLink: mangabz_functionNext, + insertPosition: ['css;#cp_img', 3], + insertElement: mangabz_insertElement, + replaceE: 'css;p.top-title, body > .container > div:not([id]), title', + intervals: 500, + scrollDelta: 1000 + } + }, // Mangabz 漫画 + mangabz_list: { + SiteTypeID: 0, + pager: { + type: 1, + nextLink: '//div[@class="page-pagination"]//a[@href][contains(text(), ">")]', + pageElement: 'css;ul.mh-list > li', + insertPosition: ['css;ul.mh-list', 3], + replaceE: 'css;.page-pagination', + scrollDelta: 800 + } + }, // Mangabz 漫画 - 分类/搜索页 netbian: { SiteTypeID: 0, host: 'pic.netbian.com', @@ -3884,6 +3917,79 @@ } + // [Mangabz 漫画] 初始化(调整本话图片) + function mangabz_init() { + pageNumber('del'); + let showimage = document.getElementById('showimage'), + cp_img = document.getElementById('cp_img'), + cp_image = document.getElementById('cp_image'); + if (showimage) {showimage.removeAttribute('oncontextmenu');} + if (cp_img) {cp_img.removeAttribute('oncontextmenu');} + if (cp_image) { + cp_image.removeAttribute('oncontextmenu'); + cp_image.removeAttribute('id'); + cp_image.removeAttribute('style'); + } + } + // [Mangabz 漫画] 获取下一页地址 + function mangabz_functionNext() { + var url = ''; + if (MANGABZ_PAGE === MANGABZ_IMAGE_COUNT) { // 下一话 + url = getElementByXpath('//a[./img[contains(@src, "icon_xiayizhang")]]') + if (url === curSite.pageUrl) return + curSite.pageUrl = url + //console.log(curSite.pageUrl) + getPageElems(curSite.pageUrl); // 访问下一话 URL 获取 + } else { // 下一页 + if (!mkey) var mkey = ''; + url = location.origin + location.pathname + 'chapterimage.ashx' + `?cid=${MANGABZ_CID}&page=${MANGABZ_PAGE + 1}&key=${(mkey)}&_cid=${MANGABZ_CID}&_mid=${MANGABZ_MID}&_dt=${MANGABZ_VIEWSIGN_DT}&_sign=${MANGABZ_VIEWSIGN}` + if (url === curSite.pageUrl) return + curSite.pageUrl = url + //console.log(curSite.pageUrl) + getPageElems(curSite.pageUrl, 'text', 'GET', '', 'Next'); // 访问下一页 URL 获取 + } + } + // [Mangabz 漫画] 插入数据 + function mangabz_insertElement(pageElems, type) { + if (pageElems) { + if (type === 'Next') { + let imgArr = eval(pageElems), + _img = ''; + for (let now of imgArr) { + _img += ``; + } + if (_img) { + document.querySelector(curSite.pager.insertPosition[0].replace('css;', '')).insertAdjacentHTML(addTo(curSite.pager.insertPosition[1]), _img); // 将 img 标签插入到网页中 + + // 添加历史记录 + MANGABZ_PAGE += imgArr.length; + window.history.pushState(`{title: ${document.title}, url: ${location.href}}`, document.title, location.origin + MANGABZ_CURL.substring(0, MANGABZ_CURL.length - 1) + '-p' + MANGABZ_PAGE + '/'); + } + } else { + // 插入