斗鱼自动抢鱼丸

自动领取斗鱼的鱼丸,自动等待,自动发送弹幕增加领取机率 get the yuwan from douyu automatically

目前为 2016-10-27 提交的版本。查看 最新版本

// ==UserScript==
// @name         斗鱼自动抢鱼丸
// @namespace    http://tampermonkey.net/
// @version      0.1.7
// @description  自动领取斗鱼的鱼丸,自动等待,自动发送弹幕增加领取机率 get the yuwan from douyu automatically
// @author       Chuck
// @match        https://www.douyu.com/*
// @match        http://www.douyu.com/*
// @icon         http://www.douyu.com/favicon.ico
// @grant        none
// ==/UserScript==

console.log("鱼丸自动领取已经启动");
setInterval(function(){
if($(".peck-cdn").html()!="loading...")
  {	
    try{
     eval("timer");
     clearInterval(timer);
   } catch (e){}
	timer = setInterval(function(){
		if($(".peck-cdn").html()=="领取")
			{					
				$(".b-btn").click();
				$(".peck-cdn").click();
                if($(".peck-cdn").html()=="loading...")
				 clearInterval(timer);
			}
	},500);
	
  }
}, 10000);

//sendingInterval 为弹幕发送间隔,300000 = 300秒,可以自行修改
//发送功能已经禁用,需要启用请将下面4行开头的"//"删去并保存

//var sendingInterval = 300000;
//setInterval(function(){
//	$(".cs-textarea").val(Math.ceil(Math.random()*100));
//	$(".b-btn").click();
//}, sendingInterval);