您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
This is a script demonstrated how to create a Tampermonkey script and remove advertisments from web pages.
// ==UserScript== // @name tampermonkey demonstration // @namespace http://tampermonkey.net/ // @version 0.1 // @description This is a script demonstrated how to create a Tampermonkey script and remove advertisments from web pages. // @author You // @match https://www.baidu.com/* // @icon https://www.google.com/s2/favicons?sz=64&domain=tampermonkey.net // @grant none // @license MIT // @require https://code.jquery.com/jquery-2.1.4.min.js // ==/UserScript== this.$ = this.jQuery = jQuery.noConflict(true); (function() { 'use strict'; // Your code here... // delete elements by class var underSearchboxTips = $(".under-searchbox-tips"); if (null !== underSearchboxTips && typeof(underSearchboxTips) !== "undefined" && underSearchboxTips.length > 0){ for(var i=0; i<underSearchboxTips.length; i++){ underSearchboxTips[i].remove(); } } // delete elements by id var hotsearchWrapper = $("#s-hotsearch-wrapper"); if (null !== hotsearchWrapper && typeof(hotsearchWrapper) !== "undefined"){ hotsearchWrapper.remove(); console.log("delete elements by id:s-hotsearch-wrapper finished"); } var hotsearchData = $("#hotsearch_data"); if (null !== hotsearchData && typeof(hotsearchData) !== "undefined"){ hotsearchData.remove(); console.log("delete elements by id:hotsearch_data finished"); } })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址