File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33// @name :zh-CN 知乎增强
44// @name :zh-TW 知乎增強
55// @name :en Zhihu enhancement
6- // @version 2.1.9
6+ // @version 2.2.0
77// @author X.I.U
88// @description 移除登录弹窗、屏蔽首页视频、默认收起回答、快捷收起回答/评论(左键两侧)、快捷回到顶部(右键两侧)、屏蔽用户、屏蔽关键词、移除高亮链接、屏蔽盐选内容、净化搜索热门、净化标题消息、展开问题描述、显示问题作者、置顶显示时间、完整问题时间、区分问题文章、直达问题按钮、默认高清原图、默认站外直链
99// @description :zh-TW 移除登錄彈窗、屏蔽首頁視頻、默認收起回答、快捷收起回答/評論、快捷回到頂部、屏蔽用戶、屏蔽關鍵詞、移除高亮鏈接、屏蔽鹽選內容、淨化搜索熱門、淨化標題消息、置頂顯示時間、完整問題時間、區分問題文章、默認高清原圖、默認站外直鏈...
@@ -1382,7 +1382,7 @@ function questionInvitation(){
13821382( function ( ) {
13831383 if ( window . onurlchange === undefined ) { addUrlChangeEvent ( ) ; } // Tampermonkey v4.11 版本添加的 onurlchange 事件 grant,可以监控 pjax 等网页的 URL 变化
13841384 window . addEventListener ( 'urlchange' , function ( ) { // 针对的是从单个回答页跳转到完整回答页时
1385- console . log ( location . pathname )
1385+ // console.log(location.pathname)
13861386 if ( location . pathname . indexOf ( 'question' ) > - 1 && location . pathname . indexOf ( 'waiting' ) === - 1 && location . pathname . indexOf ( '/answer/' ) === - 1 ) { // 回答页 //
13871387 setTimeout ( function ( ) {
13881388 collapsedNowAnswer ( '.QuestionPage' ) ; // 收起当前回答 + 快捷返回顶部
@@ -1402,6 +1402,7 @@ function questionInvitation(){
14021402 }
14031403 } )
14041404
1405+ removeLogin ( ) ; // 移除登录弹窗
14051406 // Violentmonkey 比 Tampermonkey 加载更早,会导致一些元素还没加载,因此需要延迟一会儿
14061407 // Tampermonkey 4.18.0 版本可能需要延迟一会执行
14071408 if ( GM_info . scriptHandler === 'Violentmonkey' || ( GM_info . scriptHandler === 'Tampermonkey' && parseFloat ( GM_info . version . slice ( 0 , 4 ) ) >= 4.18 ) ) {
@@ -1411,7 +1412,6 @@ function questionInvitation(){
14111412 }
14121413
14131414 function start ( ) {
1414- removeLogin ( ) ; // 移除登录弹窗
14151415 cleanTitles ( ) ; // 净化标题消息
14161416 removeHighlightLink ( ) ; // 移除高亮链接
14171417 setInterval ( originalPic , 100 ) ; // 默认高清原图
You can’t perform that action at this time.
0 commit comments