屏蔽知乎视频推荐

屏蔽知乎视频推荐,默认开启

// ==UserScript==
// @name         屏蔽知乎视频推荐
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  屏蔽知乎视频推荐,默认开启
// @author       Yixiong
// @match        https://www.zhihu.com/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    var monitor = new MutationObserver(mutations=>block_video());

    function block_video(){
        document.querySelectorAll(".ZVideoItem").forEach((element)=>{element.parentNode.parentNode.remove()})
    }
    monitor.observe(document.querySelector(".ListShortcut"),{
        childList: true,
        subtree: true,
        characterData: false,
        attributes: false
    })

})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址