虎牙领取宝箱

虎牙

目前为 2019-08-18 提交的版本。查看 最新版本

// ==UserScript==
// @name         虎牙领取宝箱
// @namespace    https://1silencer.github.io/
// @version      1.2
// @description  虎牙
// @author       Silencer
// @match        *://www.huya.com/*
// @icon         https://www.huya.com/favicon.ico
// ==/UserScript==

// 每100秒检测一次,可调整,过快会影响浏览器性能
let time = 100;
// 领取完宝箱是否自动关闭页面,1是自动关闭,默认为0,不关闭
let autoClose = 0;

setInterval(() => {
    let btns = document.querySelectorAll('.player-box-stat3');
    for (let i = 0; i < btns.length; i++) {
        if (btns[i].style.visibility == "visible") {
            btns[i].click();
            document.querySelector("#player-box").style.display = "none";
            new Notification('虎牙', {
                body: `已经领取第${i+1}个宝箱`
            });
            if (i == 5 && autoClose) {
                close()
            }
        }
    }
}, time * 100);

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址