NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript== // @name 去除知乎干扰 // @namespace http://tampermonkey.net/ // @version 0.1 // @description try to take over the world! // @author ihewro // @match *://www.zhihu.com/* // @grant none // @license MIT // @copyright 2022, he_wro (https://openuserjs.org/users/he_wro) // ==/UserScript== (function () { 'use strict'; // Your code here... console.log(window.location.href); //不显示消息提示和别的,但显示个人入口 if (document.getElementsByClassName("AppHeader-notifications")[0] != null) { document.getElementsByClassName("AppHeader-notifications")[0].style.visibility = 'hidden' } if (document.getElementsByClassName("AppHeader-messages")[0] != null) { document.getElementsByClassName("AppHeader-messages")[0].style.visibility = 'hidden' } //搜索框去掉提示和热榜 var searchSide = document.getElementsByClassName("SearchSideBar")[0]; if (searchSide != null) { searchSide.parentNode.removeChild(searchSide); } //定时器去除placeholder var clock = function() { var search = document.getElementById("Popover1-toggle"); var search2 = document.getElementById("Popover2-toggle"); if(search!=null){ search.setAttribute("placeholder","") window.requestAnimationFrame(clock); } if(search2!=null){ search2.setAttribute("placeholder","") window.requestAnimationFrame(clock); } } var requestId = window.requestAnimationFrame(clock); })();