// ==UserScript== // @name Block Zhihu Tag // @namespace your-namespace // @version 1.0 // @description Block a specific tag on Zhihu website // @match https://www.zhihu.com/* // @grant none // ==/UserScript== (function() { 'use strict'; // 获取所有带有指定标签的链接元素 const links = document.querySelectorAll('a[aria-label="知乎"]'); // 隐藏带有指定标签的链接元素 links.forEach(link => { link.style.display = 'none'; }); })();
标签:脚本,links,元素,namespace,屏蔽,link,UserScript,Zhihu,油猴 From: https://www.cnblogs.com/easyidea/p/17865113.html