您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
try to take over the world!
当前为
// ==UserScript== // @name closeBanner // @namespace http://tampermonkey.net/ // @version 0.2.1 // @description try to take over the world! // @author anonym // @grant none // @include https://alpha.e-sim.org/battle.html?id=* // ==/UserScript== const closeBanners = () => { const banners = document.querySelectorAll('.ui-dialog.ui-widget.ui-widget-content.ui-corner-all.ui-draggable.ui-dialog-buttons'); const closeBanner = (banner) => { const observer = new MutationObserver(mutationRecords => { const btnYes = banner.querySelectorAll('.ui-button.ui-widget.ui-state-default.ui-corner-all.ui-button-text-only')[0]; const event = new Event('click'); btnYes.dispatchEvent(event); }); observer.observe(banner, { attributes: true }); }; for(let i = 1; i< banners.length; i++) { closeBanner(banners[i]); } } let script = document.createElement('script'); script.textContent = '(' + closeBanners + ')(jQuery, window);'; document.body.appendChild(script);