您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
屏蔽知乎feed流的热门推荐
当前为
// ==UserScript== // @name 屏蔽知乎热门内容推荐 // @namespace http://tampermonkey.net/ // @version 0.12 // @description 屏蔽知乎feed流的热门推荐 // @author Yidadaa // @match https://www.zhihu.com/ // @grant none // ==/UserScript== (function() { 'use strict'; let lastItemCount = 0; const selectItems = () => document.querySelectorAll('.TopstoryItem'); const doRemove = () => { const newItems = selectItems(); if (newItems.length !== lastItemCount) { Array.from(newItems) .filter(v => v.innerText.indexOf('热门内容') > -1) .forEach(v => v.style.display='none'); lastItemCount = newItems.length; } }; const oldListener = window.onscroll; window.onscroll = () => { if (!!oldListener) oldListener(); doRemove(); }; const oldOnload = window.onload; window.onload = () => { if (!!oldOnload) oldOnload(); doRemove(); }; })();