您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
自动删除小黑盒互动地图app广告
当前为
// ==UserScript== // @name 删除小黑盒互动地图app广告 // @namespace http://tampermonkey.net/ // @version 1.3 // @license MIT // @description 自动删除小黑盒互动地图app广告 // @author NoWorld // @match https://web.xiaoheihe.cn/tools/map?game_name=*&zoom=8 // @icon https://web.xiaoheihe.cn/public/heybox_bbs_128_128.png // @grant none // ==/UserScript== (function() { 'use strict'; // 删除元素 function removeElements(selector) { const elements = document.querySelectorAll(selector); elements.forEach((element) => { if (element) { element.remove(); } }); } // 创建观察者实例并传入回调函数 const observer = new MutationObserver((mutations) => { mutations.forEach((mutation) => { // 如果新增的节点中包含符合选择器的元素,则删除 if (mutation.addedNodes.length) { removeElements('.com-download-guide'); } }); }); // 观察文档的子节点变化 observer.observe(document.body, { childList: true, subtree: true }); // 初始检查,以便在页面加载时也能处理 removeElements('.com-download-guide'); })();