From 1d475721dee0941180c65361c0cdb7997402e9d9 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Tue, 14 Dec 2021 14:36:49 +0800 Subject: [PATCH 0001/1559] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20[=E6=94=B6?= =?UTF-8?q?=E8=97=8F=E5=A4=B9=E9=A1=B5]=20=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Zhihu-Enhanced.user.js | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/Zhihu-Enhanced.user.js b/Zhihu-Enhanced.user.js index bd0baa7c5..01ff2ef4d 100644 --- a/Zhihu-Enhanced.user.js +++ b/Zhihu-Enhanced.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 知乎增强 -// @version 1.8.4 +// @version 1.8.5 // @author X.I.U // @description 移除登录弹窗、屏蔽首页视频、默认收起回答、快捷收起当前回答/评论(左键两侧空白处)、快捷回到顶部(右键两侧空白处)、屏蔽用户 (发布的内容)、屏蔽关键词(标题/评论)、移除高亮链接、屏蔽盐选内容、净化标题消息、展开问题描述、置顶显示时间、完整问题时间、区分问题文章、直达问题按钮、默认高清原图、默认站外直链 // @match *://www.zhihu.com/* @@ -717,6 +717,9 @@ function blockKeywords(type) { case 'people': blockKeywords_('.List-item', 'List-item'); break; + case 'collection': + blockKeywords_('.Card.CollectionDetailPageItem', 'Card CollectionDetailPageItem'); + break; case 'search': blockKeywords_search(); break; @@ -1477,7 +1480,7 @@ function questionInvitation(){ questionRichTextMore(); // 展开问题描述 blockUsers('question'); // 屏蔽指定用户 blockYanXuan(); // 屏蔽盐选内容 - blockType('question'); // 屏蔽指定类别(视频/文章等) + blockType('question'); // 屏蔽指定类别(视频/文章等) defaultCollapsedAnswer(); // 默认收起回答 } setInterval(topTime_question, 300); // 置顶显示时间 @@ -1500,7 +1503,7 @@ function questionInvitation(){ blockUsers('topic'); // 屏蔽指定用户 blockKeywords('topic'); // 屏蔽指定关键词 } - } else if (location.hostname === 'zhuanlan.zhihu.com'){ // 文章 // + } else if (location.hostname === 'zhuanlan.zhihu.com'){ // 文章 // backToTop('article.Post-Main.Post-NormalMain'); // 快捷返回顶部 backToTop('div.Post-Sub.Post-NormalSub'); // 快捷返回顶部 setInterval(topTime_zhuanlan, 300); // 置顶显示时间 @@ -1516,6 +1519,13 @@ function questionInvitation(){ setInterval(topTime_people, 300); // 置顶显示时间 blockUsers('people'); // 屏蔽指定用户 blockKeywords('people'); // 屏蔽指定关键词 + } else if (location.pathname.indexOf('/collection/') > -1) { // 收藏夹 // + addTypeTips(); // 区分问题文章 + addToQuestion(); // 直达问题按钮 + collapsedNowAnswer('main'); // 收起当前回答 + 快捷返回顶部 + collapsedNowAnswer('.CollectionsDetailPage'); // 收起当前回答 + 快捷返回顶部 + setInterval(topTime_people, 300); // 置顶显示时间 + blockKeywords('collection'); // 屏蔽指定关键词 } else { // 首页 // collapsedNowAnswer('main div'); // 收起当前回答 + 快捷返回顶部 collapsedNowAnswer('.Topstory-container'); // 收起当前回答 + 快捷返回顶部 From 27c2786edee67431f614732d06ed2f9edcb54634 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Thu, 16 Dec 2021 09:49:47 +0800 Subject: [PATCH 0002/1559] =?UTF-8?q?=E8=B0=83=E6=95=B4=20=E6=96=87?= =?UTF-8?q?=E5=AD=97=E7=BB=86=E8=8A=82?= 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 01ff2ef4d..7ecc862a4 100644 --- a/Zhihu-Enhanced.user.js +++ b/Zhihu-Enhanced.user.js @@ -33,7 +33,7 @@ var menu_ALL = [ ['menu_blockKeywords', '屏蔽指定关键词', '屏蔽指定关键词', true], ['menu_customBlockKeywords', '自定义屏蔽关键词', '自定义屏蔽关键词', []], ['menu_blockType', '屏蔽指定类别 (视频/文章等)', '勾选 = 屏蔽该类别的信息流', ''], - ['menu_blockTypeVideo', '视频 [首页、搜索页]', '视频(首页、搜索页)', true], + ['menu_blockTypeVideo', '视频 [首页、搜索页、问题页]', '视频(首页、搜索页、问题页)', true], ['menu_blockTypeArticle', '文章 [首页、搜索页]', '文章(首页、搜索页)', false], ['menu_blockTypeTopic', '话题 [搜索页]', '话题(搜索页)', false], ['menu_blockTypeSearch', '杂志文章、相关搜索等 [搜索页]', '相关搜索、杂志等(搜索页)', false], From 143794d9e9b2a67a99ad2f11a8f4ebe3378edcff Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Thu, 16 Dec 2021 17:45:42 +0800 Subject: [PATCH 0003/1559] =?UTF-8?q?=E4=BC=98=E5=8C=96=20[Discuz!=20-=20?= =?UTF-8?q?=E5=B8=96=E5=AD=90=E5=86=85]=20=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Autopage.user.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Autopage.user.js b/Autopage.user.js index 0c18f592d..3810a49e0 100644 --- a/Autopage.user.js +++ b/Autopage.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 自动无缝翻页 -// @version 4.1.5 +// @version 4.1.6 // @author X.I.U // @description 无缝拼接下一页内容(瀑布流),目前支持:[所有「Discuz!、Flarum、phpBB、Xiuno、XenForo、DUX/XIU/D8/Begin(WP主题)」网站]、百度、谷歌、必应、搜狗、头条搜索、360 搜索、微信搜索、贴吧、豆瓣、知乎、微博、NGA、V2EX、B 站(Bilibili)、Pixiv、蓝奏云、煎蛋网、糗事百科、龙的天空、起点小说、IT之家、千图网、Pixabay、3DM、游侠网、游民星空、NexusMods、Steam 创意工坊、CS.RIN.RU、片库、茶杯狐、NO视频、低端影视、奈菲影视、音范丝、BT之家、萌番组、动漫花园、樱花动漫、爱恋动漫、AGE 动漫、Nyaa、SrkBT、RARBG、SubHD、423Down、不死鸟、扩展迷、极简插件、小众软件、动漫狂、漫画猫、漫画 DB、动漫之家、拷贝漫画、包子漫画、古风漫画网、Mangabz、PubMed、GreasyFork、Github、StackOverflow(以上仅一小部分,更多的写不下了... // @match *://*/* @@ -180,7 +180,7 @@ function: { type: 1, nextL: 'css;a.nxt:not([href^="javascript"]) ,a.next:not([href^="javascript"])', pageE: 'css;#postlist > div[id^="post_"]', - replaceE: 'css;#ct > .pgs, .pages', + replaceE: '//div[contains(@class,"pg") or contains(@class,"pages")][./a[contains(@class,"nxt") or contains(@class,"next")][not(contains(@href,"javascript") or contains(@href,"commentmore"))]]', scrollD: 1500 }, function: { @@ -6770,14 +6770,17 @@ function: { } } } else { // 获取主体元素失败后,尝试重新获取 + console.log(curSite.pager.pageE, pageElems, curSite.pager.insertP, toElement) if (curSite.retry) { + console.warn('[自动无缝翻页] 获取主体元素失败,尝试重新获取...') setTimeout(function(){curSite.pageUrl = '';}, curSite.retry) } else { // 尝试替换元素看能不能继续翻页下去 if (curSite.pager.replaceE) { if (replaceElems(response)) { // 如果替换成功 + console.log('[自动无缝翻页] 获取主体元素失败,尝试替换元素成功!') pageNum.now = pageNum._now + 1; // 当前页码 + 1 if (curSite.history) addHistory(response); // 添加历史记录 - } + } else {console.error('[自动无缝翻页] 获取主体元素失败,尝试替换元素失败...')} } } } From 650b632887b9d9ba966295af716269fa8cb97ee5 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Fri, 17 Dec 2021 19:10:48 +0800 Subject: [PATCH 0004/1559] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20[F=20=E6=90=9C]?= =?UTF-8?q?=20=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Autopage.user.js | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/Autopage.user.js b/Autopage.user.js index 3810a49e0..ded9bb659 100644 --- a/Autopage.user.js +++ b/Autopage.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 自动无缝翻页 -// @version 4.1.6 +// @version 4.1.7 // @author X.I.U // @description 无缝拼接下一页内容(瀑布流),目前支持:[所有「Discuz!、Flarum、phpBB、Xiuno、XenForo、DUX/XIU/D8/Begin(WP主题)」网站]、百度、谷歌、必应、搜狗、头条搜索、360 搜索、微信搜索、贴吧、豆瓣、知乎、微博、NGA、V2EX、B 站(Bilibili)、Pixiv、蓝奏云、煎蛋网、糗事百科、龙的天空、起点小说、IT之家、千图网、Pixabay、3DM、游侠网、游民星空、NexusMods、Steam 创意工坊、CS.RIN.RU、片库、茶杯狐、NO视频、低端影视、奈菲影视、音范丝、BT之家、萌番组、动漫花园、樱花动漫、爱恋动漫、AGE 动漫、Nyaa、SrkBT、RARBG、SubHD、423Down、不死鸟、扩展迷、极简插件、小众软件、动漫狂、漫画猫、漫画 DB、动漫之家、拷贝漫画、包子漫画、古风漫画网、Mangabz、PubMed、GreasyFork、Github、StackOverflow(以上仅一小部分,更多的写不下了... // @match *://*/* @@ -604,13 +604,10 @@ function: { pager: { type: 6, nextL: () => getNextP('css;.selected.turn-page-text.turn-page-num', 'pageIndex=', /pageIndex=\d+/), - pageE: 'css;#search-result > div', + pageE: 'css;.organic-results > div', replaceE: 'css;.bottom-pagination', loadTime: 1000, scrollD: 3000 - }, - function: { - bF: fsou_bF } }, // F 搜 baidu_tieba: { @@ -5630,14 +5627,6 @@ function: { } - // [F 搜] 的插入前函数(移除旧页码) - function fsou_bF(pageElems) { - let old = getCSS('.bottom-pagination') - if (old) old.remove(); - return pageElems - } - - // [SkrBT] 获取下一页地址 function skrbt_nextL() { let page = getCSS('a[onclick][aria-label="Next"]'); From a2b672fdd2345ede6b0384bb9c77b61f392752f6 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Fri, 17 Dec 2021 20:05:44 +0800 Subject: [PATCH 0005/1559] =?UTF-8?q?=E4=BC=98=E5=8C=96=20[Discuz!=20-=20?= =?UTF-8?q?=E5=B8=96=E5=AD=90=E5=86=85]=20=E8=A7=84=E5=88=99?= 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 ded9bb659..e928b405e 100644 --- a/Autopage.user.js +++ b/Autopage.user.js @@ -180,7 +180,7 @@ function: { type: 1, nextL: 'css;a.nxt:not([href^="javascript"]) ,a.next:not([href^="javascript"])', pageE: 'css;#postlist > div[id^="post_"]', - replaceE: '//div[contains(@class,"pg") or contains(@class,"pages")][./a[contains(@class,"nxt") or contains(@class,"next")][not(contains(@href,"javascript") or contains(@href,"commentmore"))]]', + replaceE: '//div[contains(@class,"pg") or contains(@class,"pages")][./a[contains(@class,"nxt") or contains(@class,"next") or contains(@class,"prev")][not(contains(@href,"javascript") or contains(@href,"commentmore"))]]', scrollD: 1500 }, function: { From fb82bdbf78d0e8407388ec7ae3a285348bf4e674 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Sun, 19 Dec 2021 11:14:28 +0800 Subject: [PATCH 0006/1559] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20[=E5=BF=85?= =?UTF-8?q?=E5=BA=94=20-=20=E6=89=8B=E6=9C=BA=E7=89=88]=20=E6=94=AF?= =?UTF-8?q?=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Autopage.user.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Autopage.user.js b/Autopage.user.js index e928b405e..77291ab17 100644 --- a/Autopage.user.js +++ b/Autopage.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 自动无缝翻页 -// @version 4.1.7 +// @version 4.1.8 // @author X.I.U // @description 无缝拼接下一页内容(瀑布流),目前支持:[所有「Discuz!、Flarum、phpBB、Xiuno、XenForo、DUX/XIU/D8/Begin(WP主题)」网站]、百度、谷歌、必应、搜狗、头条搜索、360 搜索、微信搜索、贴吧、豆瓣、知乎、微博、NGA、V2EX、B 站(Bilibili)、Pixiv、蓝奏云、煎蛋网、糗事百科、龙的天空、起点小说、IT之家、千图网、Pixabay、3DM、游侠网、游民星空、NexusMods、Steam 创意工坊、CS.RIN.RU、片库、茶杯狐、NO视频、低端影视、奈菲影视、音范丝、BT之家、萌番组、动漫花园、樱花动漫、爱恋动漫、AGE 动漫、Nyaa、SrkBT、RARBG、SubHD、423Down、不死鸟、扩展迷、极简插件、小众软件、动漫狂、漫画猫、漫画 DB、动漫之家、拷贝漫画、包子漫画、古风漫画网、Mangabz、PubMed、GreasyFork、Github、StackOverflow(以上仅一小部分,更多的写不下了... // @match *://*/* @@ -415,7 +415,7 @@ function: { history: true, pager: { type: 1, - nextL: 'css;a.sb_pagN', + nextL: 'css;a.sb_pagN, a.sb_halfnext, a.sb_fullnpl', pageE: 'css;#b_results > li:not(.b_msg):not([class="b_ans"]):not(.b_pag):not(#mfa_root)', replaceE: 'css;#b_results > .b_pag', scrollD: 1500 From a8a3b90e556f96573721e67daf84e46e1cb8da9b Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Sun, 19 Dec 2021 21:05:55 +0800 Subject: [PATCH 0007/1559] =?UTF-8?q?=E4=BC=98=E5=8C=96=20[=E8=8F=9C?= =?UTF-8?q?=E9=B8=9F=E6=95=99=E7=A8=8B]=20=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Autopage.user.js | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/Autopage.user.js b/Autopage.user.js index 77291ab17..ac89afa56 100644 --- a/Autopage.user.js +++ b/Autopage.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 自动无缝翻页 -// @version 4.1.8 +// @version 4.1.9 // @author X.I.U // @description 无缝拼接下一页内容(瀑布流),目前支持:[所有「Discuz!、Flarum、phpBB、Xiuno、XenForo、DUX/XIU/D8/Begin(WP主题)」网站]、百度、谷歌、必应、搜狗、头条搜索、360 搜索、微信搜索、贴吧、豆瓣、知乎、微博、NGA、V2EX、B 站(Bilibili)、Pixiv、蓝奏云、煎蛋网、糗事百科、龙的天空、起点小说、IT之家、千图网、Pixabay、3DM、游侠网、游民星空、NexusMods、Steam 创意工坊、CS.RIN.RU、片库、茶杯狐、NO视频、低端影视、奈菲影视、音范丝、BT之家、萌番组、动漫花园、樱花动漫、爱恋动漫、AGE 动漫、Nyaa、SrkBT、RARBG、SubHD、423Down、不死鸟、扩展迷、极简插件、小众软件、动漫狂、漫画猫、漫画 DB、动漫之家、拷贝漫画、包子漫画、古风漫画网、Mangabz、PubMed、GreasyFork、Github、StackOverflow(以上仅一小部分,更多的写不下了... // @match *://*/* @@ -4214,16 +4214,12 @@ function: { if (next && next.href.split('/').length === location.href.split('/').length && next.href.split('/')[3] === location.href.split('/')[3]) return next.href; next.href = location.href; curSite = {SiteTypeID: 0}; return '' }, - pageE: 'css;#content > *', + pageE: 'css;#content > *, script[src*="assets/js/main.min.js"]', insertP: ['css;#content', 3], replaceE: 'css;.previous-next-links, #leftcolumn', + scriptT: 2, forceHTTPS: true, scrollD: 1000 - }, - function: { - aF: function() { // 左侧栏高亮当前页面标题 - let title = document.title.split(' | '); if (title.length > 1) {title = title[0]; getAllCSS('#leftcolumn > a').forEach(function(e){if (e.innerText === title) {e.style = 'background-color: rgb(150, 185, 125); font-weight: bold; color: rgb(255, 255, 255);';}})} - } } }, // 菜鸟教程 cnblogs: { @@ -6730,6 +6726,12 @@ function: { // 当前页码 + 1 pageNum.now = pageNum._now + 1 + // 添加历史记录 + if (curSite.history) addHistory(response); + + // 替换待替换元素 + if (curSite.pager.replaceE) replaceElems(response); + // 插入