您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
知乎视频狗都不看!
// ==UserScript== // @name 移除知乎首页视频 // @namespace http://tampermonkey.net/ // @version 0.5 // @description 知乎视频狗都不看! // @author You // @match https://www.zhihu.com/ // @icon https://www.google.com/s2/favicons?domain=zhihu.com // @license MIT // @grant none // ==/UserScript== (function() { 'use strict'; // Your code here... setInterval(remove, 500); removeAds(); })(); function remove(){ const list = Array.from(document.querySelectorAll('.TopstoryItem-isRecommend')); list.forEach(x => { if (x.children[0].moduleInfo?.card?.has_video) { x.remove(); } }) } function removeAds() { const style = document.createElement('style'); style.type = 'text/css'; document.head.appendChild(style); style.sheet.insertRule(".TopstoryItem--advertCard,.Business-Card-PcRightBanner-link,.AdvertImg{display: none;}"); }