close sis ad

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

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

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

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==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)

})();