Greasy Fork

Greasy Fork is available in English.

New Userscript

try to take over the world!

目前为 2018-04-16 提交的版本,查看 最新版本

// ==UserScript==
// @name         New Userscript
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       You
// @match        https://www.zhihu.com/
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    const doRemove = () => Array.from(document.querySelectorAll('.TopstoryItem'))
        .filter(v => v.innerText.indexOf('热门内容') > -1)
        .forEach(v => v.style.display='none');
    const oldListener = window.onscroll;
    window.onscroll = () => {
        if (!!oldListener) oldListener();
        doRemove();
    };
    doRemove();
})();