Greasy Fork

Greasy Fork is available in English.

斗鱼自动回复,可重复回复(刷屏)

斗鱼自动回复,自定义时间,次数,回复内容!

当前为 2018-10-19 提交的版本,查看 最新版本

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         斗鱼自动回复,可重复回复(刷屏)
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  斗鱼自动回复,自定义时间,次数,回复内容!
// @author       Pi7bo1
// @match        https://www.douyu.com/*
// @grant        none
// @supportURL   [email protected]
// ==/UserScript==

(function() {
    'use strict';

    // Your code here...

    var count = 0;

    window.woshinidie = function(text,time){

        var stext = text || new Date();
        var timer = time || 5;

        count += 1;

        document.getElementById('js-send-msg').querySelectorAll('.cs-textarea')[0].value = (count%2 == 0 ?  "‍"  : "")   + stext;
        var e = document.createEvent("MouseEvents");

        e.initEvent("click", true, true);

        document.getElementById('js-send-msg').querySelectorAll('.b-btn')[0].dispatchEvent(e);

        console.log('当前共发送' + count + "条弹幕");

        setTimeout(window.woshinidie,timer * 1000,stext,timer);
    }

})();