From c99be0a17da5e9eafaaf51797238a11807e4855c Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Thu, 29 Feb 2024 09:37:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20[=E5=B1=8F=E8=94=BD?= =?UTF-8?q?=E5=85=B3=E9=94=AE=E8=AF=8D]=E3=80=81[=E5=B1=8F=E8=94=BD?= =?UTF-8?q?=E7=B1=BB=E5=88=AB]=20=E5=AF=B9=20=E9=A6=96=E9=A1=B5=E5=85=B3?= =?UTF-8?q?=E6=B3=A8=E9=A1=B5=20=E7=9A=84=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 | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/Zhihu-Enhanced.user.js b/Zhihu-Enhanced.user.js index 831df9c..603d918 100644 --- a/Zhihu-Enhanced.user.js +++ b/Zhihu-Enhanced.user.js @@ -3,7 +3,7 @@ // @name:zh-CN 知乎增强 // @name:zh-TW 知乎增強 // @name:en Zhihu enhancement -// @version 2.2.15 +// @version 2.3.0 // @author X.I.U // @description 移除登录弹窗、屏蔽首页视频、默认收起回答、快捷收起回答/评论(左键两侧)、快捷回到顶部(右键两侧)、屏蔽用户、屏蔽关键词、移除高亮链接、屏蔽盐选内容/热榜杂项、净化搜索热门、净化标题消息、展开问题描述、显示问题作者、置顶显示时间、完整问题时间、区分问题文章、直达问题按钮、默认高清原图、默认站外直链 // @description:zh-TW 移除登錄彈窗、屏蔽首頁視頻、默認收起回答、快捷收起回答/評論、快捷回到頂部、屏蔽用戶、屏蔽關鍵詞、移除高亮鏈接、屏蔽鹽選內容、淨化搜索熱門、淨化標題消息、置頂顯示時間、完整問題時間、區分問題文章、默認高清原圖、默認站外直鏈... @@ -754,6 +754,9 @@ function blockKeywords(type) { case 'index': blockKeywords_('.Card.TopstoryItem.TopstoryItem-isRecommend', 'Card TopstoryItem TopstoryItem-isRecommend'); break; + case 'follow': + blockKeywords_('.Card.TopstoryItem.TopstoryItem-isFollow', 'Card TopstoryItem TopstoryItem-isFollow'); + break; case 'topic': blockKeywords_('.List-item.TopicFeedItem', 'List-item TopicFeedItem'); break; @@ -1460,18 +1463,21 @@ function blockHotOther() { blockUsers('question'); // 屏蔽指定用户 blockYanXuan(); // 屏蔽盐选内容 }, 300); - } else if (location.pathname == '/') { + } else if (location.pathname == '/') { // 推荐 setTimeout(()=>{ blockUsers('index'); // 屏蔽指定用户 blockKeywords('index'); // 屏蔽指定关键词 blockType(); // 屏蔽指定类别(视频/文章等) }, 500); - } else if (location.pathname == '/hot') { + } else if (location.pathname == '/hot') { // 热榜 setTimeout(()=>{ - //屏蔽指定关键词 - blockKeywords('index'); - // 移除热播杂项 - blockHotOther(); + blockKeywords('index'); // 屏蔽指定关键词 + blockHotOther(); // 移除热播杂项 + }, 500); + } else if (location.pathname == '/follow') { // 关注 + setTimeout(()=>{ + blockKeywords('follow'); // 屏蔽指定关键词 + blockType(); // 屏蔽指定类别(视频/文章等) }, 500); } }) @@ -1577,13 +1583,16 @@ function blockHotOther() { setInterval(function(){topTime_('.TopstoryItem', 'ContentItem-meta')}, 300); // 置顶显示时间 addTypeTips(); // 区分问题文章 addToQuestion(); // 直达问题按钮 - if (location.pathname == '/') { + if (location.pathname == '/') { // 推荐 blockUsers('index'); // 屏蔽指定用户 blockKeywords('index'); // 屏蔽指定关键词 blockType(); // 屏蔽指定类别(视频/文章等) - } else if (location.pathname == '/hot') { + } else if (location.pathname == '/hot') { // 热榜 blockKeywords('index'); // 屏蔽指定关键词 blockHotOther(); // 屏蔽热榜杂项 + } else if (location.pathname == '/follow') { // 关注 + blockKeywords('follow'); // 屏蔽指定关键词 + blockType(); // 屏蔽指定类别(视频/文章等) } else { blockUsers(); }