close sis ad

本脚本等待页面加载完成后,获取页面最后一个按钮(即关闭广告按钮)并点击,自动关闭提示

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         close sis ad
// @namespace    http://tampermonkey.net/
// @version      2024-03-31
// @description  本脚本等待页面加载完成后,获取页面最后一个按钮(即关闭广告按钮)并点击,自动关闭提示
// @author       yt
// @match        *://sis.xxx/*
// @match        *://sexinsex.net/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=sis.xxx
// @grant        none
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';

    // Your code here...

    //等待页面加载完成后,获取页面最后一个按钮(即关闭广告按钮)并点击
    window.addEventListener('load',function() {
        // 获取页面上所有的按钮元素
        const buttons = document.querySelectorAll('button');
        // 点击最后一个按钮,即关闭广告按钮
        buttons[buttons.length - 1].click();
    },false)

})();