From 2629fef1bc6840048c9c6eb875a8f47d94de986d Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Wed, 8 Sep 2021 12:47:38 +0800 Subject: [PATCH 0001/1850] =?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-Beautification.user.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Zhihu-Beautification.user.js b/Zhihu-Beautification.user.js index 6f1f07525..5ec3d1a38 100644 --- a/Zhihu-Beautification.user.js +++ b/Zhihu-Beautification.user.js @@ -2,7 +2,7 @@ // @name 知乎美化 // @version 1.3.7 // @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 bb4c761fd57c9fb45eafa8843f2c2d07562faf1a Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Wed, 8 Sep 2021 12:48:16 +0800 Subject: [PATCH 0002/1850] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20=E5=B1=8F?= =?UTF-8?q?=E8=94=BD=E9=97=AE=E9=A2=98=E9=A1=B5=E7=99=BB=E5=BD=95=E6=8F=90?= =?UTF-8?q?=E7=A4=BA=E5=8A=9F=E8=83=BD=EF=BC=88=E9=9D=9E=E5=BC=B9=E7=AA=97?= =?UTF-8?q?=E7=9A=84=E9=82=A3=E7=A7=8D=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Zhihu-Enhanced.user.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Zhihu-Enhanced.user.js b/Zhihu-Enhanced.user.js index 2c63fcd10..23600573c 100644 --- a/Zhihu-Enhanced.user.js +++ b/Zhihu-Enhanced.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 知乎增强 -// @version 1.7.0 +// @version 1.7.1 // @author X.I.U // @description 移除登录弹窗、默认收起回答、一键收起回答、收起当前回答/评论(点击两侧空白处)、快捷回到顶部(右键两侧空白处)、屏蔽用户 (发布的内容)、屏蔽关键词(标题/评论)、屏蔽指定类别(视频/文章等)、屏蔽盐选内容、展开问题描述、置顶显示时间、完整问题时间、区分问题文章、直达问题按钮、默认高清原图、默认站外直链 // @match *://www.zhihu.com/* @@ -1142,6 +1142,7 @@ function removeLogin() { if (document.querySelector('button.AppHeader-login')) { // 如果存在,则代表未登录 const observer = new MutationObserver(removeLoginModal); observer.observe(document, { childList: true, subtree: true }); + document.lastElementChild.appendChild(document.createElement('style')).textContent = '.Question-mainColumnLogin {display: none !important;}'; // 屏蔽问题页中间的登录提示 document.querySelector('button.AppHeader-login').onclick=function(){location.href='https://www.zhihu.com/signin';} // [登录] 按钮跳转至登录页面 } } From 26029d3b33d83e00ed9cf90a341b0f425c52321d Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Wed, 8 Sep 2021 14:13:03 +0800 Subject: [PATCH 0003/1850] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20[MINI4K]?= =?UTF-8?q?=E3=80=81[A4k=20=E5=AD=97=E5=B9=95=E7=BD=91]=E3=80=81[=E5=B0=84?= =?UTF-8?q?=E6=89=8B=E7=BD=91]=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 | 75 +++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 64 insertions(+), 11 deletions(-) diff --git a/Autopage.user.js b/Autopage.user.js index 9b80ff72f..07c57d4b9 100644 --- a/Autopage.user.js +++ b/Autopage.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 自动无缝翻页 -// @version 2.1.9 +// @version 2.2.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之家、爱恋动漫、Nyaa、SrkBT、RARBG、SubHD、423Down、不死鸟、小众软件、极简插件、异次元软件、异星软件空间、动漫狂、漫画猫、漫画DB、HiComic、动漫之家、古风漫画网、PubMed、wikiHow、GreasyFork(以上仅一部分,更多的写不下了... // @match *://*/* @@ -1008,7 +1008,7 @@ function: { before: cs_rin_ru_functionBefore } - }, // 各版块帖子列表 + }, // cs.rin.ru - 各版块帖子列表 cs_rin_ru_viewtopic: { SiteTypeID: 0, pager: { @@ -1019,7 +1019,7 @@ replaceE: 'css;#pagecontent >table:not(.tablebg), #pageheader p.gensmall', scrollDelta: 1500 } - }, // 帖子内 + }, // cs.rin.ru - 帖子内 cs_rin_ru_search: { SiteTypeID: 0, pager: { @@ -1030,7 +1030,7 @@ replaceE: 'css;#wrapcentre > div', scrollDelta: 1500 } - }, // 搜索页 + }, // cs.rin.ru - 搜索页 crackhub: { SiteTypeID: 0, host: 'crackhub.site', @@ -1245,10 +1245,10 @@ SiteTypeID: 0, host: 'subdh.com', functionStart: function() {if (location.pathname === '/' || location.pathname.indexOf('/list/new') > -1) { - curSite = DBSite.subdh; - } else if (location.pathname.indexOf('/search') > -1) { - curSite = DBSite.subdh_search; - }}, + curSite = DBSite.subdh; + } else if (location.pathname.indexOf('/search') > -1) { + curSite = DBSite.subdh_search; + }}, pager: { type: 1, nextLink: '//a[@class="page-link"][contains(text(), "下一页")]', @@ -1269,6 +1269,45 @@ scrollDelta: 1000 } }, //SubDH - 搜索页 + mini4k: { + SiteTypeID: 0, + host: 'www.mini4k.com', + functionStart: function() {if (location.pathname != '/' && !(/\/\d{3,}/.test(location.pathname))) {curSite = DBSite.mini4k;};}, + pager: { + type: 1, + nextLink: 'css;a.pager__item--next[href]', + pageElement: 'css;div[class*="-item-list"] > ul > li', + insertPosition: ['css;div[class*="-item-list"] > ul', 3], + replaceE: 'css;.pagination', + scrollDelta: 2000 + } + }, // MINI4K + a4k: { + SiteTypeID: 0, + host: 'www.a4k.net', + functionStart: function() {if (location.pathname.indexOf('/subtitle/') === -1) {curSite = DBSite.a4k;};}, + pager: { + type: 1, + nextLink: 'css;a.pager__item--next[href]', + pageElement: 'css;ul.list > li', + insertPosition: ['css;ul.list', 3], + replaceE: 'css;.pagination', + scrollDelta: 1000 + } + }, // A4k 字幕网(字幕) + assrt: { + SiteTypeID: 0, + host: 'assrt.net', + functionStart: function() {if (location.pathname != '/') {curSite = DBSite.assrt;};}, + pager: { + type: 1, + nextLink: assrt_functionNext, + pageElement: 'css;.resultcard > div:not(#top-banner):not(#bottom-banner)', + insertPosition: ['css;.pagelinkcard', 1], + replaceE: 'css;.pagelinkcard', + scrollDelta: 1000 + } + }, // 射手网(字幕) subhd: { SiteTypeID: 0, host: 'subhd.tv', @@ -1285,7 +1324,7 @@ replaceE: 'css;nav.clearfix', scrollDelta: 1000 } - }, // SubHD + }, // SubHD(字幕) subhd_forum: { SiteTypeID: 0, pager: { @@ -1296,7 +1335,7 @@ replaceE: 'css;nav.clearfix', scrollDelta: 800 } - }, // SubHD - forum + }, // SubHD - forum(字幕) baoshuu: { SiteTypeID: 0, host: 'www.baoshuu.com', @@ -1620,7 +1659,7 @@ replaceE: 'css;nav.navigation.posts-navigation', scrollDelta: 1500 } - }, + }, // 下面这几个都是国外博客网站 winaero: { SiteTypeID: 0, host: 'winaero.com', @@ -2639,6 +2678,20 @@ } + // [射手网] 获取下一页地址 + function assrt_functionNext() { + let nextXPAHT = '//a[@id="pl-nav"][@href][contains(text(), ">")]' + let url = getElementByXpath(nextXPAHT); + if (url) { + url = /(?<=\()\d+(?=,)/.exec(url.href)[0] + if (url) { + return (location.origin + location.pathname + location.search.replace(/(&)?page=\d+$/,'') + '&page=' + url); + } + } + return ''; + } + + // [不死鸟] 的插入前函数(加载图片) function iao_su_functionBefore(pageElems) { pageElems.forEach(function (one) { From 313abad9ec45daba26890e11994b7854cc5d9ee1 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Wed, 8 Sep 2021 22:25:56 +0800 Subject: [PATCH 0004/1850] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20[StackOverflow]?= =?UTF-8?q?=E3=80=81[=E5=88=86=E4=BA=AB=E8=80=85]=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 | 85 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 82 insertions(+), 3 deletions(-) diff --git a/Autopage.user.js b/Autopage.user.js index 07c57d4b9..54b7b5b5e 100644 --- a/Autopage.user.js +++ b/Autopage.user.js @@ -1,8 +1,8 @@ // ==UserScript== // @name 自动无缝翻页 -// @version 2.2.0 +// @version 2.2.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之家、爱恋动漫、Nyaa、SrkBT、RARBG、SubHD、423Down、不死鸟、小众软件、极简插件、异次元软件、异星软件空间、动漫狂、漫画猫、漫画DB、HiComic、动漫之家、古风漫画网、PubMed、wikiHow、GreasyFork(以上仅一部分,更多的写不下了... +// @description 无缝拼接下一页内容(瀑布流),目前支持:[所有使用「Discuz!、Flarum、DUX(WordPress)」的网站]、百度、谷歌、必应、搜狗、头条、360、微信、贴吧、豆瓣、微博、NGA、V2EX、起点小说、煎蛋网、IT之家、千图网、Pixabay、3DM、游侠网、游民星空、NexusMods、Steam 创意工坊、小霸王其乐无穷、CS.RIN.RU、FitGirl、茶杯狐、NO视频、低端影视、奈菲影视、91美剧网、真不卡影院、片库、音范丝、BT之家、爱恋动漫、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 @@ -1419,6 +1419,31 @@ before: iao_su_functionBefore } }, // 不死鸟 + sharerw: { + SiteTypeID: 0, + host: 'www.sharerw.com', + functionStart: function() {if (location.pathname.indexOf('.html') === -1) { + if (location.pathname === '/search.php') {curSite = DBSite.sharerw_search;} else {curSite = DBSite.sharerw;};};}, + pager: { + type: 1, + nextLink: 'css;span.next > a[href]', + pageElement: 'css;.new-post > article', + insertPosition: ['css;.new-post', 3], + replaceE: 'css;.pagebar', + scrollDelta: 1500 + } + }, // 分享者 + sharerw_search: { + SiteTypeID: 0, + pager: { + type: 1, + nextLink: 'css;span.next > a[href]', + pageElement: 'css;#mainbox > article', + insertPosition: ['css;.pagebar', 1], + replaceE: 'css;.pagebar', + scrollDelta: 1500 + } + }, // 分享者 - 搜索页 appinn: { SiteTypeID: 0, host: 'www.appinn.com', @@ -1659,7 +1684,7 @@ replaceE: 'css;nav.navigation.posts-navigation', scrollDelta: 1500 } - }, // 下面这几个都是国外博客网站 + }, // 下面这几个都是国外博客网站 winaero: { SiteTypeID: 0, host: 'winaero.com', @@ -2055,6 +2080,60 @@ scrollDelta: 1500 } }, // Github - Search 列表 - user + stackoverflow: { + SiteTypeID: 0, + host: 'stackoverflow.com', + functionStart: function() {if (location.pathname.indexOf('/questions') > -1) { + curSite = DBSite.stackoverflow; + } else if (location.pathname === '/search') { + curSite = DBSite.stackoverflow_search; + } else if (location.pathname === '/tags') { + curSite = DBSite.stackoverflow_tags; + } else if (location.pathname === '/users') { + curSite = DBSite.stackoverflow_users; + }}, + pager: { + type: 1, + nextLink: 'css;a[href][rel="next"]', + pageElement: 'css;#questions > div', + insertPosition: ['css;#questions', 3], + replaceE: 'css;.pager', + scrollDelta: 1500 + } + }, // StackOverflow - Questions + stackoverflow_tags: { + SiteTypeID: 0, + pager: { + type: 1, + nextLink: 'css;a[href][rel="next"]', + pageElement: 'css;#tags-browser > div', + insertPosition: ['css;#tags-browser', 3], + replaceE: 'css;.pager', + scrollDelta: 1500 + } + }, // StackOverflow - Tags + stackoverflow_users: { + SiteTypeID: 0, + pager: { + type: 1, + nextLink: 'css;a[href][rel="next"]', + pageElement: 'css;#user-browser > div:first-child > div', + insertPosition: ['css;#user-browser > div:first-child', 3], + replaceE: 'css;.pager', + scrollDelta: 1500 + } + }, // StackOverflow - Users + stackoverflow_search: { + SiteTypeID: 0, + pager: { + type: 1, + nextLink: 'css;a[href][rel="next"]', + pageElement: 'css;.js-search-results > div:first-child > div', + insertPosition: ['css;.js-search-results > div:first-child', 3], + replaceE: 'css;.pager', + scrollDelta: 1500 + } + }, // StackOverflow - Search pubmed: { SiteTypeID: 0, host: 'pubmed.ncbi.nlm.nih.gov', From 1d43b9a198de588efe86165a0df08444d656fa14 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Wed, 8 Sep 2021 22:44:51 +0800 Subject: [PATCH 0005/1850] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20[=E5=9C=A8?= =?UTF-8?q?=E7=BA=BF=E4=B9=8B=E5=AE=B6]=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 | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/Autopage.user.js b/Autopage.user.js index 54b7b5b5e..296d0e683 100644 --- a/Autopage.user.js +++ b/Autopage.user.js @@ -1,8 +1,8 @@ // ==UserScript== // @name 自动无缝翻页 -// @version 2.2.1 +// @version 2.2.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之家、爱恋动漫、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之家、爱恋动漫、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 @@ -1111,6 +1111,24 @@ scrollDelta: 1500 } }, // 低端影视 + zxzj: { + SiteTypeID: 0, + host: 'www.zxzj.me', + functionStart: function() {if (location.pathname != '/' && location.pathname.indexOf('/detail/') === -1) { + curSite = DBSite.zxzj; document.lastElementChild.appendChild(document.createElement('style')).textContent = 'div.stui-page__all {display: none !important;}'; + }}, + pager: { + type: 1, + nextLink: '//ul[contains(@class, "stui-page__item")]//a[contains(text(), "下一页")]', + pageElement: 'css;ul.stui-vodlist > li', + insertPosition: ['css;ul.stui-vodlist', 3], + replaceE: 'css;ul.stui-page__item', + scrollDelta: 1000 + }, + function: { + before: nfmovies_functionBefore + } + }, // 在线之家 zhenbuka: { SiteTypeID: 0, host: ['www.zhenbuka3.com', 'www.zhenbuka5.com'], @@ -2745,7 +2763,7 @@ } - // [奈菲影视/真不卡影院] 的插入前函数(加载图片) + // [奈菲影视/在线之家/真不卡影院] 的插入前函数(加载图片) function nfmovies_functionBefore(pageElems) { pageElems.forEach(function (one) { let now = one.querySelector('a.lazyload') From dfaa05f2fa66338a8cfe6f3f9c8d553c0e5fa54a Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Fri, 10 Sep 2021 10:29:27 +0800 Subject: [PATCH 0006/1850] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20[SegmentFault]?= =?UTF-8?q?=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 | 66 +++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 60 insertions(+), 6 deletions(-) diff --git a/Autopage.user.js b/Autopage.user.js index 296d0e683..656b47092 100644 --- a/Autopage.user.js +++ b/Autopage.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 自动无缝翻页 -// @version 2.2.2 +// @version 2.2.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之家、爱恋动漫、Nyaa、SrkBT、RARBG、SubHD、423Down、不死鸟、小众软件、极简插件、动漫狂、漫画猫、漫画DB、HiComic、动漫之家、古风漫画网、PubMed、wikiHow、GreasyFork、Github、StackOverflow(以上仅一部分,更多的写不下了... // @match *://*/* @@ -29,7 +29,7 @@ ['menu_discuz_thread_page', '帖子内自动翻页 (仅论坛)', '帖子内自动翻页 (仅论坛)', true], ['menu_page_number', '显示当前页码及点击暂停翻页', '显示当前页码及点击暂停翻页', true], ['menu_pause_page', '左键双击网页空白处暂停翻页', '左键双击网页空白处暂停翻页', false] - ], menuId = [], webType = 0, curSite = {SiteTypeID: 0}, DBSite, SiteType, pausePage = true, pageNum = {now: 1, _now: 1}, forumWebsite = ['cs.rin.ru', 'www.flyert.com', 'bbs.pediy.com', 'www.libaclub.com']; + ], menuId = [], webType = 0, curSite = {SiteTypeID: 0}, DBSite, SiteType, pausePage = true, pageNum = {now: 1, _now: 1}, locationchange = false, nowLocation = '', forumWebsite = ['cs.rin.ru', 'www.flyert.com', 'bbs.pediy.com', 'www.libaclub.com']; for (let i=0;i -1) { curSite = DBSite.github_star; } else if (location.pathname.indexOf('/issues') > -1 && location.pathname.indexOf('/issues/') === -1) { @@ -1996,7 +1997,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: 1500 + scrollDelta: 2000 } }, // Github - Issues 列表 github_search: { @@ -2152,6 +2153,22 @@ scrollDelta: 1500 } }, // StackOverflow - Search + segmentfault: { + SiteTypeID: 0, + host: 'segmentfault.com', + functionStart: function() {locationchange = true; + if (location.pathname.indexOf('/questions') > -1) { + curSite = DBSite.segmentfault; + }}, + pager: { + type: 1, + nextLink: '//a[@class="page-link"][contains(text(), "下一页")]', + pageElement: 'css;ul.list-group > li', + insertPosition: ['css;ul.list-group', 3], + replaceE: 'css;ul.pagination', + scrollDelta: 1000 + } + }, // SegmentFault - Questions pubmed: { SiteTypeID: 0, host: 'pubmed.ncbi.nlm.nih.gov', @@ -2459,6 +2476,22 @@ if (GM_getValue('menu_page_number')) {pageNumber('add');} else {pageNumber('set');} // 显示页码 pausePageEvent(); // 左键双击网页空白处暂停翻页 + + 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 + + if (GM_getValue('menu_page_number')) {pageNumber('add');} else {pageNumber('set');} // 显示页码 + pausePageEvent(); // 左键双击网页空白处暂停翻页 + } + }) + } + curSite.pageUrl = ''; // 下一页URL //console.log(curSite); pageLoading(); // 自动无缝翻页 @@ -3320,7 +3353,7 @@ function pausePageEvent() { if (!GM_getValue('menu_pause_page')) return if (curSite.SiteTypeID === 0) return - document.body.addEventListener('dblclick', function (e) { + document.body.addEventListener('dblclick', function () { if (pausePage) { pausePage = false; GM_notification({text: `❌ 已暂停本页 [自动无缝翻页]\n (再次双击可恢复)`, timeout: 2500}); @@ -3334,7 +3367,7 @@ // 显示页码 function pageNumber(type) { - if (curSite.SiteTypeID === 0) return + if (curSite.SiteTypeID === 0) {let status = document.getElementById('Autopage_number');if (status) {status.style.display = 'none';}; return} let status = document.getElementById('Autopage_number'); switch (type) { case 'add': @@ -3721,6 +3754,27 @@ } } + // 自定义 locationchange 事件(用来监听 URL 变化) + function addLocationchange() { + history.pushState = ( f => function pushState(){ + var ret = f.apply(this, arguments); + window.dispatchEvent(new Event('pushstate')); + window.dispatchEvent(new Event('locationchange')); + return ret; + })(history.pushState); + + history.replaceState = ( f => function replaceState(){ + var ret = f.apply(this, arguments); + window.dispatchEvent(new Event('replacestate')); + window.dispatchEvent(new Event('locationchange')); + return ret; + })(history.replaceState); + + window.addEventListener('popstate',()=>{ + window.dispatchEvent(new Event('locationchange')) + }); + } + /*// 监听 XMLHttpRequest URL var _send = window.XMLHttpRequest.prototype.send function sendReplacement(data) { From 547872d78d1fbcde7218f6cf14d9a2826e4c757b Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Fri, 10 Sep 2021 10:39:29 +0800 Subject: [PATCH 0007/1850] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20[SegmentFault]?= =?UTF-8?q?=20=E6=90=9C=E7=B4=A2=E9=A1=B5=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Autopage.user.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/Autopage.user.js b/Autopage.user.js index 656b47092..df5286a60 100644 --- a/Autopage.user.js +++ b/Autopage.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 自动无缝翻页 -// @version 2.2.3 +// @version 2.2.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之家、爱恋动漫、Nyaa、SrkBT、RARBG、SubHD、423Down、不死鸟、小众软件、极简插件、动漫狂、漫画猫、漫画DB、HiComic、动漫之家、古风漫画网、PubMed、wikiHow、GreasyFork、Github、StackOverflow(以上仅一部分,更多的写不下了... // @match *://*/* @@ -2159,6 +2159,8 @@ functionStart: function() {locationchange = true; if (location.pathname.indexOf('/questions') > -1) { curSite = DBSite.segmentfault; + } else if (location.pathname === '/search') { + curSite = DBSite.segmentfault_search; }}, pager: { type: 1, @@ -2169,6 +2171,17 @@ scrollDelta: 1000 } }, // SegmentFault - Questions + segmentfault_search: { + SiteTypeID: 0, + pager: { + type: 1, + nextLink: 'css;a[href][rel="next"]', + pageElement: 'css;.search-result > section', + insertPosition: ['css;.search-result > div:last-child', 1], + replaceE: 'css;ul.pagination', + scrollDelta: 1000 + } + }, // SegmentFault - Search pubmed: { SiteTypeID: 0, host: 'pubmed.ncbi.nlm.nih.gov', From 36c52e69e7b3d8e6341cb1d698f8b7fee8847cdf Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Fri, 10 Sep 2021 21:57:06 +0800 Subject: [PATCH 0008/1850] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20[=E5=AE=BD?= =?UTF-8?q?=E5=B1=8F=E6=98=BE=E7=A4=BA]=20=E6=94=AF=E6=8C=81=E6=96=87?= =?UTF-8?q?=E7=AB=A0=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Zhihu-Beautification.user.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Zhihu-Beautification.user.js b/Zhihu-Beautification.user.js index 5ec3d1a38..b8ba155cc 100644 --- a/Zhihu-Beautification.user.js +++ b/Zhihu-Beautification.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 知乎美化 -// @version 1.3.7 +// @version 1.3.8 // @author X.I.U // @description 宽屏显示、暗黑模式(4种)、暗黑模式跟随浏览器、隐藏文章开头大图、调整图片最大高度、向下翻时自动隐藏顶栏、文章编辑页面与实际文章宽度一致 // @match *://www.zhihu.com/* @@ -28,6 +28,7 @@ ['menu_widescreenDisplayQuestion', '问题页', '宽屏显示', true], ['menu_widescreenDisplaySearch', '搜索页、话题页、圈子', '宽屏显示', true], ['menu_widescreenDisplayCollection', '收藏页', '宽屏显示', true], + ['menu_widescreenDisplayPost', '文章页', '宽屏显示', false], ['menu_widescreenDisplayWidth', '宽屏宽度', '宽屏宽度 (100~1000)', '1000'], ['menu_darkMode', '暗黑模式', '暗黑模式', true], ['menu_darkModeType', '暗黑模式切换(1~4)', '暗黑模式切换', 1], @@ -59,7 +60,7 @@ menu_ID[i] = GM_registerMenuCommand(`${menu_num(menu_ALL[i][3])} ${menu_ALL[i][1]}`, function(){menu_toggle(`${menu_ALL[i][3]}`,`${menu_ALL[i][0]}`)}); } else if (menu_ALL[i][0] === 'menu_widescreenDisplay'){ GM_registerMenuCommand(`#️⃣ ${menu_ALL[i][1]}`, function(){menu_setting('checkbox', menu_ALL[i][1], menu_ALL[i][2], true, [menu_ALL[i+1], menu_ALL[i+2], menu_ALL[i+3], menu_ALL[i+4], menu_ALL[i+5]])}); - } else if (menu_ALL[i][0] != 'menu_widescreenDisplayIndex' && menu_ALL[i][0] != 'menu_widescreenDisplayQuestion' && menu_ALL[i][0] != 'menu_widescreenDisplaySearch' && menu_ALL[i][0] != 'menu_widescreenDisplayCollection' && menu_ALL[i][0] != 'menu_widescreenDisplayWidth') { + } else if (menu_ALL[i][0].indexOf('menu_widescreenDisplay') === -1) { menu_ID[i] = GM_registerMenuCommand(`${menu_ALL[i][3]?'✅':'❌'} ${menu_ALL[i][1]}`, function(){menu_switch(`${menu_ALL[i][3]}`,`${menu_ALL[i][0]}`,`${menu_ALL[i][2]}`)}); } } @@ -201,6 +202,10 @@ .CollectionsDetailPage-mainColumn {width: inherit !important;} .CollectionDetailPageSideBar {display: none !important;} .CollectionsDetailPage {width: ${GM_getValue('menu_widescreenDisplayWidth')}px;} +`, + style_widescreenDisplayPost = `/* 宽屏显示 - 文章页 */ +.Post-SideActions {left: calc(10vw) !important;} +.Post-NormalMain .Post-Header, .Post-NormalMain>div, .Post-NormalSub>div {width: ${GM_getValue('menu_widescreenDisplayWidth')}px !important;} `, style_2 = `/* 隐藏在各列表中查看文章时开头显示的大图,不影响文章、专栏页面 */ .RichContent img.ArticleItem-image {display: none !important;} @@ -417,6 +422,7 @@ html {filter: brightness(75%) sepia(30%) !important; background-image: url();} if (menu_value('menu_widescreenDisplayQuestion') && location.pathname.indexOf('/question/') > -1) style += style_widescreenDisplayQuestion; if (menu_value('menu_widescreenDisplaySearch') && (location.pathname === '/search' || location.pathname.indexOf('/club/') > -1 || location.pathname.indexOf('/topic/') > -1)) style += style_widescreenDisplaySearch; if (menu_value('menu_widescreenDisplayCollection') && location.pathname.indexOf('/collection/') > -1) style += style_widescreenDisplayCollection; + if (menu_value('menu_widescreenDisplayPost') && location.hostname.indexOf('zhuanlan') > -1 && location.pathname.indexOf('/edit') === -1) style += style_widescreenDisplayPost; // 调整图片最大高度 if (menu_value('menu_picHeight')) style += style_5; @@ -426,7 +432,7 @@ html {filter: brightness(75%) sepia(30%) !important; background-image: url();} if (menu_value('menu_hideTitle')) style += style_4; // 文章编辑页面与实际文章宽度一致 - if (window.location.href.indexOf('zhuanlan') > -1 && window.location.href.indexOf('/edit') > -1) style += style_3; + if (location.hostname.indexOf('zhuanlan') > -1 && location.pathname.indexOf('/edit') > -1) style += style_3; if (document.lastChild) { document.lastChild.appendChild(style_Add).textContent = style; From de247f1ad88f3a576d10bc625852f9129c265b05 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Sat, 11 Sep 2021 09:03:49 +0800 Subject: [PATCH 0009/1850] =?UTF-8?q?=E4=BC=98=E5=8C=96=20[NexusMods]=20?= =?UTF-8?q?=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Autopage.user.js | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/Autopage.user.js b/Autopage.user.js index df5286a60..76e735ea1 100644 --- a/Autopage.user.js +++ b/Autopage.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 自动无缝翻页 -// @version 2.2.4 +// @version 2.2.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之家、爱恋动漫、Nyaa、SrkBT、RARBG、SubHD、423Down、不死鸟、小众软件、极简插件、动漫狂、漫画猫、漫画DB、HiComic、动漫之家、古风漫画网、PubMed、wikiHow、GreasyFork、Github、StackOverflow(以上仅一部分,更多的写不下了... // @match *://*/* @@ -956,10 +956,10 @@ pager: { type: 4, nextLink: nexusmods_functionNext, - pageElement: 'css;#mod-list > ul.tiles > li', - insertPosition: ['css;#mod-list > ul.tiles', 3], + pageElement: 'css;ul.tiles > li', + insertPosition: ['css;ul.tiles', 3], insertElement: nexusmods_insertElement, - replaceE: 'css;#mod-list .pagination', + replaceE: 'css;.pagination', scrollDelta: 3000 } }, // NexusMods @@ -2726,9 +2726,11 @@ // [NexusMods] 获取下一页地址 function nexusmods_functionNext() { if (document.querySelector('.nexus-ui-blocker')) return - let out_items = JSON.stringify(RH_ModList.out_items).replace(/{|}|"/g,''), - nextNum = getElementByXpath('id("mod-list")/div[contains(@class, "pagenav")][1]//a[contains(@class, "page-selected")]/parent::li/following-sibling::li/a'), - categories = RH_ModList.out_items.categories, categoriesUrl = ''; + let modList; + if (location.pathname.indexOf('/news') > -1) {modList = RH_NewsTabContent;} else {modList = RH_ModList;} + let out_items = JSON.stringify(modList.out_items).replace(/{|}|"/g,''), + nextNum = getElementByXpath('//div[contains(@class, "pagenav")][1]//a[contains(@class, "page-selected")]/parent::li/following-sibling::li/a'), + categories = modList.out_items.categories, categoriesUrl = ''; var url = ''; if (nextNum && nextNum.innerText) { nextNum = nextNum.innerText; @@ -2746,7 +2748,7 @@ out_items = out_items.replace(/categories:\[.*\]/, categoriesUrl) } } - url = 'https://www.nexusmods.com' + RH_ModList.uri + '?RH_ModList=' + out_items + url = `https://www.nexusmods.com${modList.uri}?RH_${modList.id}=${out_items}` //console.log(nextNum, url, curSite.pageUrl, out_items) if (url === curSite.pageUrl) return curSite.pageUrl = url; @@ -2766,7 +2768,10 @@ if (now) { let downloadCount = now.querySelector('.downloadcount > span.flex-label'); if (downloadCount) { - downloadCount.textContent = shortFormat(parseInt(GlobalModStats[now.dataset.gameId][now.dataset.modId].total)); + console.log(now.dataset.gameId, now.dataset.modId) + if (GlobalModStats[now.dataset.gameId] && GlobalModStats[now.dataset.gameId][now.dataset.modId]) { + downloadCount.textContent = shortFormat(parseInt(GlobalModStats[now.dataset.gameId][now.dataset.modId].total)); + } } } }); From 923c8630e9745e6d4e6f58e7ce3800738c58491f Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Sat, 11 Sep 2021 17:18:07 +0800 Subject: [PATCH 0010/1850] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20[3DM=20MOD?= =?UTF-8?q?=E7=AB=99]=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 | 58 +++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 48 insertions(+), 10 deletions(-) diff --git a/Autopage.user.js b/Autopage.user.js index 76e735ea1..885508b7b 100644 --- a/Autopage.user.js +++ b/Autopage.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 自动无缝翻页 -// @version 2.2.5 +// @version 2.2.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之家、爱恋动漫、Nyaa、SrkBT、RARBG、SubHD、423Down、不死鸟、小众软件、极简插件、动漫狂、漫画猫、漫画DB、HiComic、动漫之家、古风漫画网、PubMed、wikiHow、GreasyFork、Github、StackOverflow(以上仅一部分,更多的写不下了... // @match *://*/* @@ -97,6 +97,7 @@ 2 = 下一页主体元素同级