Greasy Fork

Greasy Fork is available in English.

JS弹幕发射鸡

虎牙JS弹幕发射鸡

当前为 2021-07-26 提交的版本,查看 最新版本

// ==UserScript==
// @icon         https://huyaimg.msstatic.com/avatar/1094/b7/1429a763a419403e621a3472214759_180_135.jpg?1461836156?452005
// @name         JS弹幕发射鸡
// @namespace    http://tampermonkey.net/
// @version      0.3
// @description  虎牙JS弹幕发射鸡
// @author       饭店的老师
// @match        *://www.huya.com/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    var counter = 0;
    function co(){

        counter++;
        if(counter>=4){
            setTimeout(fn, 10000);
            counter = 0;
        }else{
            setTimeout(fn, 500);

        }
    }

    function fn() {

        var input = document.querySelector('#player-full-input-txt');
        input.value = "夺笋";
        var btn = document.querySelector('#player-full-input-btn');
        btn.click();

        setTimeout(co, 100);
    }


    // Your code here...
})();