您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
移除知乎页面顶部的搜索热词。通过拦截原型方法实现,不会出现闪现现象。
// ==UserScript== // @name 知乎移除搜索热词 // @namespace https://greasyfork.org/zh-CN/users/948411 // @version 1.3 // @description 移除知乎页面顶部的搜索热词。通过拦截原型方法实现,不会出现闪现现象。 // @author Moe // @match https://www.zhihu.com/* // @icon https://static.zhihu.com/heifetz/assets/apple-touch-icon-152.81060cab.png // @grant none // @license Apache License 2.0 // @run-at document-start // ==/UserScript== (function() { "use strict"; const nativeSetAttribute = Element.prototype.setAttribute; Element.prototype.setAttribute = function(name, value) { if (name === "placeholder" && this.closest?.(".SearchBar-input")) { Element.prototype.setAttribute = nativeSetAttribute; return; } nativeSetAttribute.call(this, name, value); }; })();