Greasy Fork

Greasy Fork is available in English.

Tapd Auto Close Popup

关闭tpad人数限制弹框

当前为 2025-04-07 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         Tapd Auto Close Popup
// @namespace    https://www.tapd.cn/
// @version      0.1.0
// @description  关闭tpad人数限制弹框
// @author       u2joy
// @match        https://www.tapd.cn/*
// @icon         data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant        none
// @license MIT
// ==/UserScript==

(function() {
    'use strict';

    const popupSelector = '.el-dialog';
    const closeBtnSelector = '.el-dialog__headerbtn';
    const wrapCls = '.company-renew-dialog';

    // 每隔一段时间(此处1s)检查弹窗
    const popupInterval = setInterval(() => {
        const popup = document.querySelectorAll(popupSelector);
        const closeBtns = document.querySelectorAll(closeBtnSelector);
        console.log(closeBtns)
        if (popup && closeBtns) {
            closeBtns.forEach(i=>i.click());
        }
        clearInterval(popupInterval);
    }, 1000);
})();