auto lucky draw

自动破产工具

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name        auto lucky draw
// @namespace   Violentmonkey Scripts
// @match       https://zmpt.cc/plugin/lucky-draw
// @match       https://hdfans.org/plugin/lucky-draw
// @match       https://hhanclub.top/plugin/lucky-draw
// @match       https://ptvicomo.net/plugin/lucky-draw
// @match       https://www.agsvpt.com/plugin/lucky-draw
// @match       https://www.ptlsp.com/plugin/lucky-draw
// @grant       none
// @version     0.0.1
// @description 自动破产工具
// @license MIT
// ==/UserScript==
 
(function () {
 
    var host = window.location.host;
 
    if (sessionStorage.getItem('confirm') != 'ok') {
        if (confirm("确定要执行操作吗?")) {
            sessionStorage.setItem('confirm', 'ok');
        } else {
            window.location.assign('https://' + host)
        }
    }
 
    var wait = ms => new Promise(resolve => setTimeout(resolve, ms))
 
    if (window.location.href.indexOf('https://' + host + '/plugin/lucky-draw') == 0) {
        wait(5000).then(() => {
            $('#pointer').click();
        });
    }
 
    var timer1 = setInterval(function () {
        // 查找具有 class="layui-layer-btn0" 的元素
        var element = document.querySelector('.layui-layer-btn0');
        if (element) {
            // 如果找到了元素
            clearInterval(timer1);
            $(element).click();
        }
    }, 2000);
})();