// ==UserScript== // @icon https://www.douyu.com/favicon.ico // @name 复读机自动弹幕发射器 // @namespace https://github.com/zhenshiluosuo/Storyteller-AutoBarrageForDouyuTV // @author 闪光魔法师 // @description 适配斗鱼直播平台的自动弹幕发射器 随机复制复读机 Github:https://github.com/zhenshiluosuo/Storyteller-AutoBarrageForDouyuTV // @match *://www.douyu.com/* // @version 0.1.1 // @grant none // @downloadURL none // ==/UserScript== (function () { 'use strict'; let tip = false; let div1 = document.createElement('div');//默认悬浮窗 let div2 = document.createElement('div');//控制台 let css1 = 'background: #FFB5C5;color:#ffffff;overflow: hidden;z-index: 998;position: fixed;padding:5px;text-align:center;width: 85px;height: 22px;border-radius: 5px;right: 10px;top: 72%;' let css2 = 'background: #ffffff;overflow: hidden;z-index: 999;position: fixed;padding:5px;text-align:center;width: 110px;height: 100px;box-sizing: content-box;border: 1px solid #ff921a;border-radius: 5px;right: 10px;top: 72%;display: none;'; let cycle_time;//弹幕周期,单位毫秒 建议设定至6000毫秒以上 过低有系统屏蔽风险 let _cycle_time = 800;//弹幕div定时器 let sentence = "";//复制的弹幕 let interval;//发射定时器 let danmu_interval;//等待弹幕div加载定时器 let _ready = false;//弹幕div加载标记 let div_manmu;//网页弹幕div let div_wenzi;//网页聊天室div let _mode = false;//套娃模式标记 let __mode = false;//复读白字标记 let ___mode = false;//重复复读标记 init();//初始化 //核心功能函数 function init() { div1.id = 'DuLunChe2'; div1.id = 'DuLunChe3'; div1.style.cssText = css1; div2.style.cssText = css2; div1.innerHTML = '复读机控制台'; div2.innerHTML = '