您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
虎牙自动发上电视弹幕, 自动领六个宝箱
// ==UserScript== // @name 虎牙自动上电视/领宝箱 // @namespace http://tampermonkey.net/ // @version 0.1 // @description 虎牙自动发上电视弹幕, 自动领六个宝箱 // @author hldh214 // @match https://www.huya.com/* // @grant none // ==/UserScript== (function() { 'use strict'; let $ = window.jQuery; let tvIconThread; // 打开上电视弹框 let inputSendThread; // 发上电视弹幕 let boxThread; // 百宝箱 function waitForElm(selector) { return new Promise(resolve => { if (document.querySelector(selector)) { return resolve(document.querySelector(selector)); } const observer = new MutationObserver(mutations => { if (document.querySelector(selector)) { resolve(document.querySelector(selector)); observer.disconnect(); } }); observer.observe(document.body, { childList: true, subtree: true }); }); } waitForElm('.duya-header-right > div').then((elm) => { $(elm).prepend('<label for="cbox1">脚本</label><input type="checkbox" name="cbox1" id="cbox1" style="margin-right: 1em;">'); $('#cbox1').change((ev) => { if ($(ev.target).is(":checked")) { console.log('activate'); tvIconThread = setInterval(() => {if(!$('.input-send').length) {$('.tv-icon').click();}}, 1000); inputSendThread = setInterval(() => {$('.item-big').click(); $('.input-send').click()}, 400); boxThread = setInterval(() => {$('.player-box-stat3').click()}, 1000); } else { console.log('deactivate'); clearInterval(tvIconThread); clearInterval(inputSendThread); clearInterval(boxThread); } }); }); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址