您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Auto clicks the hide ads button
// ==UserScript== // @name Hide ads clicker // @namespace http://tampermonkey.net/ // @version 1.1 // @description Auto clicks the hide ads button // @author Roboapple // @match https://beta.sankakucomplex.com/* // @icon https://www.google.com/s2/favicons?domain=tampermonkey.net // @grant GM_log // ==/UserScript== (function() { 'use strict'; console.log("Active"); //calls the check every 10th of a second. im bad at javescript so idk how to invoke it based on the appearance of the html element. setInterval(function(){ CheckForButton();}, 100); })(); function CheckForButton(){ //checks if the button is there and if so click it if(document.getElementsByClassName("MuiButtonBase-root MuiIconButton-root")){ for (let i = 0; i < document.getElementsByClassName("MuiButtonBase-root MuiIconButton-root").length; i++) { if(document.getElementsByClassName("MuiButtonBase-root MuiIconButton-root")[i].ariaLabel == "close"){ document.getElementsByClassName("MuiButtonBase-root MuiIconButton-root")[i].click(); console.log("clicked!"); } } } }