您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
通过点击实现自动隐藏小黑盒互动地图app广告
当前为
// ==UserScript== // @name 小黑盒互动地图app广告自动隐藏 // @namespace http://tampermonkey.net/ // @version 1.1 // @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 clickElements(selector) { const elements = document.querySelectorAll(selector); elements.forEach((element) => { if (element) { element.click(); } }); } // 点击按钮 const observer = new MutationObserver((mutations) => { mutations.forEach((mutation) => { if (mutation.addedNodes.length) { clickElements('div.btn'); } }); }); // 加载内容 observer.observe(document.body, { childList: true, subtree: true }); })();