您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
try to take over the world!
当前为
// ==UserScript== // @name 知乎去视频 // @namespace http://tampermonkey.net/ // @version 0.1 // @description try to take over the world! // @author 张明亮 // @match https://www.zhihu.com/ // @icon https://www.google.com/s2/favicons?domain=zhihu.com // @grant none // ==/UserScript== (function() { 'use strict'; setInterval(removeVoid,1000);//一秒执行一次 function removeVoid(){ let chArr = document.body.getElementsByClassName("ContentItem ZVideoItem"); for(var i=0;i<chArr.length;i++){ //删除元素 元素.parentNode.removeChild(元素); if (chArr[i] != null) { chArr[i].parentNode.parentNode.remove(); } } let VideoAnswerPlayerArr = document.body.getElementsByClassName("VideoAnswerPlayer"); for(var j=0;j<VideoAnswerPlayerArr.length;j++){ //删除元素 元素.parentNode.removeChild(元素); if (VideoAnswerPlayerArr[j] != null) { VideoAnswerPlayerArr[j].parentNode.parentNode.parentNode.remove(); } } } // Your code here... })();