您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
a script to remove ads in www.zhihu.com
当前为
// ==UserScript== // @name 知乎去广告、视频 // @namespace http://tampermonkey.net/ // @version 0.2 // @description a script to remove ads in www.zhihu.com // @author CoderBen // @match https://www.zhihu.com/* // @grant none // @icon https://tse2-mm.cn.bing.net/th/id/OIP.7D-LqgunUUDXVESZYas8GAHaHa?pid=Api&rs=1 // ==/UserScript== (function() { 'use strict'; removeAd() window.onscroll = function() { removeAds() removeMovies() } function removeAds () { document.querySelectorAll('.Pc-feedAd-container').forEach(function(elem) { elem.style.display = 'none' }) } function removeMovies() { document.querySelectorAll('[data-za-extra-module]').forEach(function(elem) { if (elem.dataset.zaExtraModule.indexOf('has_video":true') > -1) { elem.style.display = 'none' elem.parentNode.style.height = '0' elem.parentNode.style.border = 'none' } }) } })();