33// @name :zh-CN 知乎增强
44// @name :zh-TW 知乎增強
55// @name :en Zhihu enhancement
6- // @version 2.2.8
6+ // @version 2.2.9
77// @author X.I.U
88// @description 移除登录弹窗、屏蔽首页视频、默认收起回答、快捷收起回答/评论(左键两侧)、快捷回到顶部(右键两侧)、屏蔽用户、屏蔽关键词、移除高亮链接、屏蔽盐选内容/热榜杂项、净化搜索热门、净化标题消息、展开问题描述、显示问题作者、置顶显示时间、完整问题时间、区分问题文章、直达问题按钮、默认高清原图、默认站外直链
99// @description :zh-TW 移除登錄彈窗、屏蔽首頁視頻、默認收起回答、快捷收起回答/評論、快捷回到頂部、屏蔽用戶、屏蔽關鍵詞、移除高亮鏈接、屏蔽鹽選內容、淨化搜索熱門、淨化標題消息、置頂顯示時間、完整問題時間、區分問題文章、默認高清原圖、默認站外直鏈...
@@ -923,7 +923,7 @@ function blockType(type) {
923923 //console.log(titleA.href)
924924 if ( location . pathname === '/search' ) { // 搜索页
925925 if ( location . search . indexOf ( 'type=content' ) === - 1 ) return // 仅限搜索页的 [综合]
926- if ( titleA . href . indexOf ( '/zvideo/' ) > - 1 || titleA . href . indexOf ( 'video.zhihu.com' ) > - 1 ) { // 如果是视频
926+ if ( titleA . href . indexOf ( '/zvideo/' ) > - 1 || titleA . href . indexOf ( 'video.zhihu.com' ) > - 1 ) { // 如果是视频
927927 if ( menu_value ( 'menu_blockTypeVideo' ) ) findParentElement ( titleA , 'Card' ) . remove ( ) ;
928928 } else if ( titleA . href . indexOf ( 'zhuanlan.zhihu.com' ) > - 1 ) { // 如果是文章
929929 if ( menu_value ( 'menu_blockTypeArticle' ) ) findParentElement ( titleA , 'Card SearchResult-Card' ) . hidden = true ;
@@ -935,14 +935,14 @@ function blockType(type) {
935935 } else if ( location . pathname . indexOf ( '/question/' ) > - 1 ) { // 问题页
936936 if ( menu_value ( 'menu_blockTypeVideo' ) ) findParentElement ( titleA , 'List-item' ) . hidden = true ;
937937 } else { // 首页
938- if ( titleA . href . indexOf ( '/zvideo/' ) > - 1 || titleA . href . indexOf ( 'video.zhihu.com' ) > - 1 ) { // 如果是视频
939- if ( menu_value ( 'menu_blockTypeVideo' ) ) findParentElement ( titleA , 'Card TopstoryItem TopstoryItem-isRecommend' ) . remove ( ) ;
938+ if ( titleA . href . indexOf ( '/zvideo/' ) > - 1 || titleA . href . indexOf ( 'video.zhihu.com' ) > - 1 ) { // 如果是视频
939+ if ( menu_value ( 'menu_blockTypeVideo' ) ) { findParentElement ( titleA , 'Card TopstoryItem TopstoryItem-isRecommend' ) . hidden = true ; findParentElement ( titleA , 'ContentItem AnswerItem' ) . remove ( ) ; }
940940 } else if ( titleA . href . indexOf ( '/answer/' ) > - 1 ) { // 如果是问题(视频回答)
941941 if ( findParentElement ( titleA , 'ContentItem AnswerItem' ) . querySelector ( '.VideoAnswerPlayer' ) ) {
942- if ( menu_value ( 'menu_blockTypeVideo' ) ) findParentElement ( titleA , 'Card TopstoryItem TopstoryItem-isRecommend' ) . remove ( ) ;
942+ if ( menu_value ( 'menu_blockTypeVideo' ) ) { findParentElement ( titleA , 'Card TopstoryItem TopstoryItem-isRecommend' ) . hidden = true ; findParentElement ( titleA , 'ContentItem AnswerItem' ) . remove ( ) ; }
943943 }
944944 } else if ( titleA . href . indexOf ( '/education/video-course/' ) > - 1 ) { // 如果是視頻課程
945- if ( menu_value ( 'menu_blockTypeVideo' ) ) findParentElement ( titleA , 'Card TopstoryItem TopstoryItem-isRecommend' ) . remove ( ) ;
945+ if ( menu_value ( 'menu_blockTypeVideo' ) ) { findParentElement ( titleA , 'Card TopstoryItem TopstoryItem-isRecommend' ) . hidden = true ; findParentElement ( titleA , 'ContentItem AnswerItem' ) . remove ( ) ; }
946946 } else if ( titleA . href . indexOf ( 'zhuanlan.zhihu.com' ) > - 1 ) { // 如果是文章
947947 if ( menu_value ( 'menu_blockTypeArticle' ) ) findParentElement ( titleA , 'Card TopstoryItem TopstoryItem-isRecommend' ) . hidden = true ;
948948 }
0 commit comments