"use strict"; // ==UserScript== // @name DouyuEx-斗鱼直播间增强插件 // @namespace https://github.com/qianjiachun // @icon https://s2.ax1x.com/2020/01/12/loQI3V.png // @version 2020.10.23.01 // @description 弹幕自动变色防检测循环发送 一键续牌 查看真实人数/查看主播数据 已播时长 一键签到(直播间/车队/鱼吧/客户端) 一键领取鱼粮(宝箱/气泡/任务) 一键寻宝 送出指定数量的礼物 一键清空背包 屏蔽广告 调节弹幕大小 自动更新 同屏画中画/多直播间小窗观看/可在斗鱼看多个平台直播(虎牙/b站) 获取真实直播流地址 自动抢礼物红包 背包信息扩展 简洁模式 夜间模式 开播提醒 幻神模式 关键词回复 关键词禁言 自动谢礼物 自动抢宝箱 弹幕右键信息扩展 防止下播自动跳转 影院模式 直播时间流控制 弹幕投票 直播滤镜 // @author 小淳 // @match *://*.douyu.com/0* // @match *://*.douyu.com/1* // @match *://*.douyu.com/2* // @match *://*.douyu.com/3* // @match *://*.douyu.com/4* // @match *://*.douyu.com/5* // @match *://*.douyu.com/6* // @match *://*.douyu.com/7* // @match *://*.douyu.com/8* // @match *://*.douyu.com/9* // @match *://*.douyu.com/topic/* // @match *://msg.douyu.com/* // @require https://cdn.jsdelivr.net/npm/flv.js@1.5.0/dist/flv.min.js // @require https://cdn.jsdelivr.net/npm/svgaplayerweb@2.3.1/build/svga.min.js // @grant GM_openInTab // @grant GM_xmlhttpRequest // @grant GM_setClipboard // @grant unsafeWindow // @downloadURL none // ==/UserScript== function init() { initPkg_Night_Set_Fast(); removeAD(); initPkg_Statistics(); initPkg_Console(); initPkg_FollowList(); } function initPkg() { initPkg_ExIcon(); initPkg_ExPanel(); initPkg_RealAudience(); initPkg_CopyRealLive(); initPkg_RemoveAD(); initPkg_BagInfo(); initPkg_Update(); initPkg_PopupPlayer(); initPkg_LiveTool(); initPkg_VideoTools(); initPkg_ExpandTool(); initPkg_Night(); initPkg_Refresh(); initPkg_BarrageLoop(); initPkg_FansContinue(); initPkg_FishFood(); initPkg_Sign(); initPkg_BarragePanel(); initPkg_AdVideo(); } function initPkg_Timer() { initPkg_FishPond_Timer(); } function initTimer() { initPkg_Timer(); exTimer = setInterval(initPkg_Timer, 20000); } function initStyles() { let style = document.createElement("style"); style.appendChild(document.createTextNode(` .bag-info { position: absolute; background-color: rgba(0, 0, 0, 0.6); color: white; width: 20px; font-weight: 800; height: 20px; text-align: center;}.bag-button { position: relative; color: rgb(255, 255, 255); text-align: center; height: 15px; line-height: 15px; cursor: pointer; margin-left: 5px; background: rgb(70, 171, 255); border-radius: 9px; padding: 0px 10px; float: right; right: 20px;}.bloop { background-color: rgba(255,255,255,0.9); width: 100%; height: 200px; position: relative; bottom: 200px; display: none;}.bloop__switch { position: absolute; right: 0; bottom: 0;}.bloop__mode { display: inline-block;}.barragePanel__funcPanel { position: absolute; width: 232px; height: 270px; display: block; background: white; overflow-y: scroll;}.barragePanel__funcPanel::-webkit-scrollbar {display:none}.barragePanel__muteTime { position: absolute; left: 25px; top: 123px; z-index: 5;}#copy-real-live { cursor: pointer;}.ex-icon { display: inline-block; vertical-align: middle; margin-right: 8px; -moz-user-select:none; /*火狐*/ -webkit-user-select:none; /*webkit浏览器*/ -ms-user-select:none; /*IE10*/ -khtml-user-select:none; /*早期浏览器*/ user-select:none;}.extool { background-color: rgba(255,255,255,0.9); width: 100%; height: 200px; position: relative; bottom: 200px; display: none;}.extool__switch { position: absolute; right: 0; bottom: 0;}.extool__bsize,.extool__sendgift { margin-bottom: 5px;}.extool__redpacket_room,.extool__gold { display: inline-block;}.ex_giftAnimation { width: 100%; height: 100%; position: absolute; z-index: 50; pointer-events: none;}.ex-panel { position: absolute; bottom: 35px; right: 63px; background-color: rgba(255,255,255,0.9); display: none; border: 2px rgb(234,173,26) solid; z-index: 7777; user-select: none;}.ex-panel__wrap { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%;}.ex-panel__icon { margin: 0 10px; display: block; position: relative; padding: 5px; transition: 0.5s;}.ex-panel__icon:hover { transform: scale(1.15);}.ex-panel__tip { display:none; background:#f00; border-radius:50%; width:8px; height:8px; top:0px; right:0px; position:absolute;}#refreshFollowList { color: grey;position: absolute;right: 5px;top:0px;cursor: pointer;}.gift__panel { width: 100%; display: none; margin-top: 4px;}#gift__title { cursor: pointer;}#gift__select { width: 190px;}.gift__option { margin-top: 5px;}#gift__giftId { width: 40px;}#gift__reply { width: 150px;}.livetool { background-color: rgba(255,255,255,0.9); width: 100%; height: 245px; position: relative; bottom: 245px; display: none;}.livetool__cell { position: relative; display: -webkit-box; display: -webkit-flex; display: flex; box-sizing: border-box; width: 100%; padding: 10px 16px; overflow: hidden; color: #323233; font-size: 14px; line-height: 24px; background-color: #fff; border-bottom: 1px solid rgba(0,0,0,0.2); flex-wrap: wrap; -webkit-flex-wrap: wrap;}.livetool__cell_title { flex: 1; -webkit-box-flex: 1;}.livetool__cell_option { flex: 1; -webkit-box-flex: 1; text-align: right;}.livetool__cell_switch { float: right;}.mute__panel { width: 100%; display: none; margin-top: 4px;}#mute__title { cursor: pointer;}#mute__idlist { cursor: pointer; color: royalblue; margin-left: 10px;}#mute__select { width: 110px;}.mute__option { margin-top: 5px;}#mute__word { width: 70px;}#mute__count { width: 30px;}#mute__time { width: 65px;}.reply__panel { width: 100%; display: none; margin-top: 4px;}#reply__title { cursor: pointer;}#reply__select { width: 190px;}.reply__option { margin-top: 5px;}#reply__word { width: 70px;}#reply__reply { width: 147px;}.livetool__Treasure { width: 100%; position: relative; z-index: 999;}.vote__panel { width: 100%; display: none; margin-top: 4px;}#vote__title { cursor: pointer;}#vote__select { width: 100px;}.vote__option { margin-top: 5px;}#vote__theme { width: 70px;}#vote__options { width: 133px;}#vote__time { width: 35px;}#vote__show-result { cursor: pointer; color: royalblue; margin-left: 10px;}.vote__result { position: absolute; top: 0px; width: 300px; background: rgba(255,255,255,0.85); left: 0px; z-index: 999; padding: 5px; border-radius: 10px; user-select: none; display: none;}#vote__result-theme { font-size: 20px; font-weight: 600; margin-bottom: 10px;}#vote__result-close { position: absolute; top: 5px; right: 10px; font-size: 14px; cursor: pointer; color: gray;}.vote__option-wrap { margin-bottom: 10px;}.vote__option-choice { display: inline-block; font-size: 14px;}.vote__option-num { float: right; font-size: 14px;}.vote__progress { width: 100%; background-color: #ddd; border-radius: 10px;}.vote__progress-bar { width: 0%; height: 14px; background-color: #4CAF50; text-align: center; line-height: 30px; border-radius: 10px;}#ex-point { cursor: pointer; float: left; line-height: 30px; -moz-user-select:none; /*火狐*/ -webkit-user-select:none; /*webkit浏览器*/ -ms-user-select:none; /*IE10*/ -khtml-user-select:none; /*早期浏览器*/ user-select:none;}#point__value { color: #333;}#ex-exchange { position: absolute; left: 0; bottom: 37px; z-index: 100;}.exchange__panel { width: 400px; height: 500px; position: relative;}.exchange__wrap { width: 400px; height: 500px; background-color: white; border-radius: 3%; overflow-y: scroll; overflow-x: hidden; box-shadow: 0px 0px 20px 0px #888888;}.exchange__wrap::-webkit-scrollbar { display:none}.exchange__close { position: absolute; color: rgb(127, 127, 137); right: 10px; top: 5px; font-size: 15px; cursor: pointer; z-index: 101;}.item__wrap { width: 100%; height: 130px; border-bottom: 1px solid rgba(121,127,137,0.4); position: relative;}.item__pic { left: 10px; top: 10px; position: absolute; height: 110px; width: 110px;}.item__name { position: absolute; top: 7px; left: 130px; color: #353536;; font-size: 15px; margin-right: 10px;}.item__description { position: absolute; top: 32px; left: 130px; font-size: 12px; margin-right: 10px; color: #969799;}.item__num { position: absolute; bottom: 27px; left: 130px; font-size: 12px; color: #969799;}.item__price { position: absolute; bottom: 7px; left: 130px; font-size: 14px; color: rgb(255,93,35); font-weight: 600;}.item__exchange { position: absolute; bottom: 8px; right: 10px; font-size: 14px; color: white; text-align: center; width: 80px; height: 25px; background-color: rgb(255,93,35); border-radius: 999px; cursor: pointer;}#ex-pointlist { position: absolute; width: 300px; height: 400px; background-color: white; border-radius: 3%; overflow: auto; z-index: 100; bottom: 37px;}#ex-pointlist::-webkit-scrollbar { display:none}.pointlist__wrap { width: 100%; height: 100%; margin: 15px 0; position: absolute;}.pointlist__close { position: absolute; color: rgb(127, 127, 137); right: 7px; font-size: 15px; cursor: pointer;}.pointlist__wrap table { border-collapse: collapse; margin: 0 auto; text-align: center;}.pointlist__wrap td,.pointlist__wrap th { border: 1px solid #cad9ea; color: #666; height: 30px; width: 85px;}.pointlist__wrap thead th { background-color: #CCE8EB; width: 100px;}.pointlist__wrap tr:nth-child(odd) { background: #fff;}.pointlist__wrap tr:nth-child(even) { background: #F5FAFA;}.point__panel { position: absolute; left: 0px; bottom: 37px; display: none; animation: move-in 0.75s; z-index: 101;}@keyframes move-in { 0% { opacity: 0; } 100% { opacity: 0.95; }}.panel__wrap { overflow: hidden; background-color: white; border-radius: 5%; width: 120px; box-shadow: 0px 2px 20px 0px #888888; font-size: 14px;}.panel__cell { width: 100%; height: 37px; line-height: 37px; border-bottom: 1px solid rgba(121,127,137,0.4); text-align: center; cursor: pointer;}.panel__cell:hover { background-color: rgb(217, 217, 217); transition: 0.75s;}.panel__triangle { width: 0px; height: 0px; border-color: white transparent transparent transparent; border-style: solid; border-width: 10px; position: absolute; left: 35px;}#ex-record { width: 300px; height: 400px; position: absolute; bottom: 67px; z-index: 100;}.record__close { position: absolute; color: rgb(127, 127, 137); right: -20px; font-size: 15px; cursor: pointer;}.records__wrap { width: 100%; height: 100%; background-color: white; border-radius: 3%; box-shadow: 0px 0px 20px 0px #888888; padding: 15px; overflow-y: scroll; overflow-x: hidden;}.records__wrap::-webkit-scrollbar { display:none}.record__wrap { height: 50px; width: 100%; border: 1px solid rgba(121,127,137,0.4); margin-bottom: 10px; display: -webkit-box; display: -moz-box; display: -ms-flexbox; display: -webkit-flex; display: flex; transition: 0.75s; cursor: pointer;}.record__wrap:hover { background-color: #e9f5ff;}.record__left { flex: 1; position: relative;}.record__name { position: absolute; flex: 1; color: #353536;; font-size: 15px; top: 2px; margin-left: 5px;}.record__updatetime { position: absolute; margin-left: 5px; font-size: 12px; bottom: 2px; color: #969799;}.record__price { line-height: 50px; color: rgb(255,93,35); margin-right: 10px;}.record__pagenav { display: -webkit-box; display: -moz-box; display: -ms-flexbox; display: -webkit-flex; display: flex; width: 310px; position: absolute; bottom: -20px; padding-left: 10px; padding-right: 10px; cursor: pointer;}.record__prev { flex: 1; text-align: center; border: 1px solid rgba(121,127,137,0.8); transition: 0.75s; color: white; background-color: rgb(57,169,237);}.record__prev:hover { background-color: #7167ff;}.record__next { flex: 1; text-align: center; border: 1px solid rgba(121,127,137,0.8); transition: 0.75s; background-color: rgb(57,169,237); color: white;}.record__next:hover { background-color: #7167ff;}.videoDiv { width: 400px; height: 200px; background-color: rgba(255, 255, 255, 0); position: absolute; z-index: 7777;}.videoPlayer { width: 100%; height: 100%; cursor: move;}.videoScale { width: 10px; height: 10px; overflow: hidden; cursor: se-resize; position: absolute; right: 0; bottom: 0; background-color: rgb(231, 57, 57);}.videoInfo { width: 100%; height: 30px; background-color: gray; position: absolute; top: -30px; line-height: 30px;}.videoClose { width: 30px; float: right; color: white;}.videoQn, .videoCDN { margin-left: 5px;}.videoRID { margin: 0px 5px; font-weight: 800; font-size: medium;}#popup-player__prompt { display: none;}.real-audience { cursor: pointer; display: flex;}#refresh-video { float: left; width: 24px; height: 24px; margin-right: 5px; cursor: pointer; background-size: contain;}.refresh-barrage { display: inline-block; vertical-align: top; margin: 0 2px; padding: 0 8px; height: 22px; line-height: 21px; background-color: #fff; border: 1px solid #e5e4e4; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; cursor: pointer;}#refresh-barrage__svg { vertical-align: middle;}#ex-cinema { float: left; width: 24px; height: 24px; margin-right: 10px; cursor: pointer; background-size: contain;}.cinema__wrap { display: none; position: relative; height: 100%; margin-right: -15px; border-radius: 4px; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; float: left; right: -12px;}.cinema__panel { position: absolute; border: 1px solid #000; border-radius: 4px; transform: translateY(calc(-4px - 100%)) translateX(-50%); left: 33%; background-color: #000; opacity: .75; width: 70px;}.cinema__panel li { padding: 0 2px; white-space: nowrap; color: #fff; text-align: center; cursor: pointer;}.cinema__panel li:hover { background-color: rgb(85, 85, 85);} #ex-filter { float: left; width: 24px; height: 24px; margin-right: 10px; cursor: pointer; background-size: contain;}.filter__wrap { display: none; position: relative; height: 100%; margin-right: -15px; border-radius: 4px; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; float: left; right: -12px;}.filter__panel { position: absolute; border: 1px solid #000; border-radius: 4px; transform: translateY(calc(-4px - 100%)) translateX(-50%); left: 33%; background-color: #000; opacity: .75; width: 300px; padding-top: 10px; padding-left: 10px; padding-right: 10px;}.filter__panel li { padding: 0 2px; white-space: nowrap; color: #fff; text-align: center; cursor: pointer;}.filter__panel li:hover { background-color: rgb(85, 85, 85);}.filter__scroll { width: 255px; height: 5px; background: #ccc; position: relative; display: inline-block;}.filter__scroll-bar { width: 15px; height: 15px; background: #369; position: absolute; top: -5px; left: 100px; cursor: pointer; border-radius: 100%;}.filter__scroll-mask { position: absolute; left: 0; top: 0; background: #369; width: 100px; height: 5px;}.filter__title { color: white; display: inline-block; cursor: initial; margin-right: 2px;}#filter__select { width: 260px; float: right;}.filter__filter { margin-top: 5px;}#ex-videospeed { float: left; width: 24px; height: 24px; margin-right: 10px; cursor: pointer; background-size: contain;}.videospeed__wrap { display: none; position: relative; height: 100%; margin-right: -15px; border-radius: 4px; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; float: left; right: -12px;}.videospeed__panel { position: absolute; border: 1px solid #000; border-radius: 4px; transform: translateY(calc(-4px - 100%)) translateX(-50%); left: 33%; background-color: #000; opacity: .75; width: 70px;}.videospeed__panel li { padding: 0 2px; white-space: nowrap; color: #fff; text-align: center; cursor: pointer;}.videospeed__panel li:hover { background-color: rgb(85, 85, 85);} #ex-videosync { float: left; width: 24px; height: 24px; margin-left: 20px; cursor: pointer; background-size: contain;}/* Notice.css*/.noticejs-top{top:0;width:100%!important}.noticejs-top .item{border-radius:0!important;margin:0!important}.noticejs-topRight{top:10px;right:10px}.noticejs-topLeft{top:10px;left:10px}.noticejs-topCenter{top:10px;left:50%;transform:translate(-50%)}.noticejs-middleLeft,.noticejs-middleRight{right:10px;top:50%;transform:translateY(-50%)}.noticejs-middleLeft{left:10px}.noticejs-middleCenter{top:50%;left:50%;transform:translate(-50%,-50%)}.noticejs-bottom{bottom:0;width:100%!important}.noticejs-bottom .item{border-radius:0!important;margin:0!important}.noticejs-bottomRight{bottom:10px;right:10px}.noticejs-bottomLeft{bottom:10px;left:10px}.noticejs-bottomCenter{bottom:10px;left:50%;transform:translate(-50%)}.noticejs{font-family:Helvetica Neue,Helvetica,Arial,sans-serif}.noticejs .item{margin:0 0 10px;border-radius:3px;overflow:hidden}.noticejs .item .close{float:right;font-size:18px;font-weight:700;line-height:1;color:#fff;text-shadow:0 1px 0 #fff;opacity:1;margin-right:7px}.noticejs .item .close:hover{opacity:.5;color:#000}.noticejs .item a{color:#fff;border-bottom:1px dashed #fff}.noticejs .item a,.noticejs .item a:hover{text-decoration:none}.noticejs .success{background-color:#64ce83}.noticejs .success .noticejs-heading{background-color:#3da95c;color:#fff;padding:10px}.noticejs .success .noticejs-body{color:#fff;padding:10px}.noticejs .success .noticejs-body:hover{visibility:visible!important}.noticejs .success .noticejs-content{visibility:visible}.noticejs .info{background-color:#3ea2ff}.noticejs .info .noticejs-heading{background-color:#067cea;color:#fff;padding:10px}.noticejs .info .noticejs-body{color:#fff;padding:10px}.noticejs .info .noticejs-body:hover{visibility:visible!important}.noticejs .info .noticejs-content{visibility:visible}.noticejs .warning{background-color:#ff7f48}.noticejs .warning .noticejs-heading{background-color:#f44e06;color:#fff;padding:10px}.noticejs .warning .noticejs-body{color:#fff;padding:10px}.noticejs .warning .noticejs-body:hover{visibility:visible!important}.noticejs .warning .noticejs-content{visibility:visible}.noticejs .error{background-color:#e74c3c}.noticejs .error .noticejs-heading{background-color:#ba2c1d;color:#fff;padding:10px}.noticejs .error .noticejs-body{color:#fff;padding:10px}.noticejs .error .noticejs-body:hover{visibility:visible!important}.noticejs .error .noticejs-content{visibility:visible}.noticejs .progressbar{width:100%}.noticejs .progressbar .bar{width:1%;height:30px;background-color:#4caf50}.noticejs .success .noticejs-progressbar{width:100%;background-color:#64ce83;margin-top:-1px}.noticejs .success .noticejs-progressbar .noticejs-bar{width:100%;height:5px;background:#3da95c}.noticejs .info .noticejs-progressbar{width:100%;background-color:#3ea2ff;margin-top:-1px}.noticejs .info .noticejs-progressbar .noticejs-bar{width:100%;height:5px;background:#067cea}.noticejs .warning .noticejs-progressbar{width:100%;background-color:#ff7f48;margin-top:-1px}.noticejs .warning .noticejs-progressbar .noticejs-bar{width:100%;height:5px;background:#f44e06}.noticejs .error .noticejs-progressbar{width:100%;background-color:#e74c3c;margin-top:-1px}.noticejs .error .noticejs-progressbar .noticejs-bar{width:100%;height:5px;background:#ba2c1d}@keyframes noticejs-fadeOut{0%{opacity:1}to{opacity:0}}.noticejs-fadeOut{animation-name:noticejs-fadeOut}@keyframes noticejs-modal-in{to{opacity:.3}}@keyframes noticejs-modal-out{to{opacity:0}}.noticejs-rtl .noticejs-heading{direction:rtl}.noticejs-rtl .close{float:left!important;margin-left:7px;margin-right:0!important}.noticejs-rtl .noticejs-content{direction:rtl}.noticejs{position:fixed;z-index:10050;width:320px}.noticejs ::-webkit-scrollbar{width:8px}.noticejs ::-webkit-scrollbar-button{width:8px;height:5px}.noticejs ::-webkit-scrollbar-track{border-radius:10px}.noticejs ::-webkit-scrollbar-thumb{background:hsla(0,0%,100%,.5);border-radius:10px}.noticejs ::-webkit-scrollbar-thumb:hover{background:#fff}.noticejs-modal{position:fixed;width:100%;height:100%;background-color:#000;z-index:10000;opacity:.3;left:0;top:0}.noticejs-modal-open{opacity:0;animation:noticejs-modal-in .3s ease-out}.noticejs-modal-close{animation:noticejs-modal-out .3s ease-out;animation-fill-mode:forwards}/** * PostbirdAlertBox.js * - 原生javascript弹框插件 * Author: Postbird - http://www.ptbird.cn * License: MIT * Date: 2017-09-23 */.postbird-box-container { width: 100%; height: 100%; overflow: hidden; position: fixed; top: 0; left: 0; z-index: 9999; background-color: rgba(0, 0, 0, 0.2); display: block; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none}.postbird-box-container.active { display: block}.postbird-box-content { min-width: 400px; max-width: 600px; min-height: 150px; background-color: #fff; border: solid 1px #dfdfdf; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); margin-top: -100px}.postbird-box-header { width: 100%; padding: 10px 15px; position: relative; font-size: 1.1em; letter-spacing: 2px}.postbird-box-close-btn { cursor: pointer; font-weight: 700; color: #000; float: right; opacity: .5; font-size: 1.3em; margin-top: -3px; display: none}.postbird-box-close-btn:hover { opacity: 1}.postbird-box-text { box-sizing: border-box; width: 100%; padding: 0 10%; text-align: center; line-height: 40px; font-size: 20px; letter-spacing: 1px}.postbird-box-footer { width: 100%; position: absolute; padding: 0; margin: 0; bottom: 0; display: flex; display: -webkit-flex; justify-content: space-around; border-top: solid 1px #dfdfdf; align-items: flex-end}.postbird-box-footer .btn-footer { line-height: 44px; border: 0; cursor: pointer; background-color: #fff; color: #0e90d2; font-size: 1.1em; letter-spacing: 2px; transition: background-color .5s; -webkit-transition: background-color .5s; -o-transition: background-color .5s; -moz-transition: background-color .5s; outline: 0}.postbird-box-footer .btn-footer:hover { background-color: #e5e5e5}.postbird-box-footer .btn-block-footer { width: 100%}.postbird-box-footer .btn-left-footer,.postbird-box-footer .btn-right-footer { position: relative; width: 100%}.postbird-box-footer .btn-left-footer::after { content: ""; position: absolute; right: 0; top: 0; background-color: #e5e5e5; height: 100%; width: 1px}.postbird-box-footer .btn-footer-cancel { color: #333}.postbird-prompt-input { width: 100%; padding: 5px; font-size: 16px; border: 1px solid #ccc; outline: 0}.onoffswitch { position: relative; width: 45px; -webkit-user-select:none; -moz-user-select:none; -ms-user-select: none;}.onoffswitch-checkbox { position: absolute; opacity: 0; pointer-events: none;}.onoffswitch-label { display: block; overflow: hidden; cursor: pointer; height: 20px; padding: 0; line-height: 20px; border: 2px solid #E3E3E3; border-radius: 20px; background-color: #FFFFFF; transition: background-color 0.3s ease-in;}.onoffswitch-label:before { content: ""; display: block; width: 20px; margin: 0px; background: #FFFFFF; position: absolute; top: 0; bottom: 0; right: 23px; border: 2px solid #E3E3E3; border-radius: 20px; transition: all 0.3s ease-in 0s; }.onoffswitch-checkbox:checked + .onoffswitch-label { background-color: #3AAD38;}.onoffswitch-checkbox:checked + .onoffswitch-label, .onoffswitch-checkbox:checked + .onoffswitch-label:before { border-color: #3AAD38;}.onoffswitch-checkbox:checked + .onoffswitch-label:before { right: 0px; }.layui-timeline { padding-left: 5px;}.layui-timeline-item { position: relative; padding-bottom: 20px;}li { list-style: none;}.layui-timeline-item:first-child::before { display: block;}.layui-timeline-item:last-child::before { content: ''; position: absolute; left: 5px; top: 0; z-index: 0; width: 0; height: 100%;}.layui-timeline-item::before { content: ''; position: absolute; left: 5px; top: 0; z-index: 0; width: 1px; height: 100%;}.layui-timeline-item::before,hr { background-color: #e6e6e6;}.layui-timeline-axis { position: absolute; left: -5px; top: 0; z-index: 10; width: 20px; height: 20px; line-height: 20px; background-color: #fff; color: #5FB878; border-radius: 50%; text-align: center; cursor: pointer;}.layui-icon { font-family: layui-icon !important; font-size: 16px; font-style: normal;}.layui-timeline-content { padding-left: 25px;}.layui-text { line-height: 22px; font-size: 14px; color: rgb(85,85,85);}.layui-timeline-title { position: relative;} `)); document.head.appendChild(style); } (function() { initRouter(window.location.href); })(); // 全局变量及公共函数 var exTimer = 0; // 总时钟句柄 var url = document.getElementsByTagName('html')[0].innerHTML; var urlLen = ("$ROOM.room_id =").length; var ridPos = url.indexOf('$ROOM.room_id ='); var rid = url.substring(ridPos + urlLen, url.indexOf(';', ridPos + urlLen)); rid = rid.trim(); url = null; urlLen = null; ridPos = null; var my_uid = getCookieValue("acf_uid"); // 自己的uid var dyToken = getToken(); function showExPanel() { // 显示功能条 let a = document.getElementsByClassName("ex-panel")[0]; if (a.style.display != "block") { a.style.display = "block"; } else { a.style.display = "none"; } } function sleep(time) { return new Promise((resolve) => setTimeout(resolve, time)); } function formatSeconds(value) { let secondTime = parseInt(value); let minuteTime = 0; let hourTime = 0; if (secondTime > 60) { minuteTime = parseInt(secondTime / 60); secondTime = parseInt(secondTime % 60); if (minuteTime > 60) { hourTime = parseInt(minuteTime / 60); minuteTime = parseInt(minuteTime % 60); } } let result = "" + parseInt(secondTime) + "秒"; if (minuteTime > 0) { result = "" + parseInt(minuteTime) + "分" + result; } if (hourTime > 0) { result = "" + parseInt(hourTime) + "小时" + result; } return result; } async function verifyFans(room_id, level) { let ret = false; let doc = await fetch('https://www.douyu.com/member/cp/getFansBadgeList',{ method: 'GET', mode: 'no-cors', cache: 'default', credentials: 'include', }).then(res => { return res.text(); }).catch(err => { console.log("请求失败!", err); }) doc = (new DOMParser()).parseFromString(doc, 'text/html'); let a = doc.getElementsByClassName("fans-badge-list")[0].lastElementChild; let n = a.children.length; for (let i = 0; i < n; i++) { let rid = a.children[i].getAttribute("data-fans-room"); let rlv = a.children[i].getAttribute("data-fans-level"); if (rid == room_id && rlv >= level) { ret = true; break; } else { ret = false; } } return ret; } function getStrMiddle(str, before, after) { let m = str.match(new RegExp(before + '(.*?)' + after)); return m ? m[1] : false; } function getToken() { // let cookie = document.cookie; // let ret = getStrMiddle(cookie, "acf_uid=", ";") + "_" + getStrMiddle(cookie, "acf_biz=", ";") + "_" + getStrMiddle(cookie, "acf_stk=", ";") + "_" + getStrMiddle(cookie, "acf_ct=", ";") + "_" + getStrMiddle(cookie, "acf_ltkid=", ";"); let ret = getCookieValue("acf_uid") + "_" + getCookieValue("acf_biz") + "_" + getCookieValue("acf_stk") + "_" + getCookieValue("acf_ct") + "_" + getCookieValue("acf_ltkid"); return ret; } function getDyDid() { // let cookie = document.cookie; // let ret = getStrMiddle(cookie, "dy_did=", ";"); let ret = getCookieValue("dy_did"); return ret; } function setCookie(cookiename, value){ let exp = new Date(); exp.setTime(exp.getTime() + 3*60*60*1000); document.cookie = cookiename + "="+ escape (value) + "; path=/; expires=" + exp.toGMTString(); } function getCookieValue(name){ let arr,reg = new RegExp("(^| )" + name + "=([^;]*)(;|$)"); if (arr = document.cookie.match(reg)) { return unescape(arr[2]); } else { return null; } } function getCCN() { // let cookie = document.cookie; // let ret = getStrMiddle(cookie, "acf_ccn=", ";"); let ret = getCookieValue("acf_ccn"); if (ret == null) { setCookie("acf_ccn", "1"); ret = "1"; } return ret; } function getUID() { let ret = getCookieValue("acf_uid"); return ret; } function showMessage(msg, type) { // type: success[green] error[red] warning[orange] info[blue] new NoticeJs({ text: msg, type: type, position: 'bottomRight', }).show(); } function openPage(url, b) { GM_openInTab(url, { active: b }); } function closePage() { if (navigator.userAgent.indexOf("Firefox") != -1 || navigator.userAgent.indexOf("Chrome") != -1) { window.location.href = "about:blank"; window.close(); } else { window.opener = null; window.open("", "_self"); window.close(); } } function getQueryString(name) { let reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"); if (window.location.hash.indexOf("?") < 0) { return null; } let r = window.location.hash.split("?")[1].match(reg); if (r != null) return decodeURIComponent(r[2]); return null; } function dateFormat(fmt, date) { let o = { "M+": date.getMonth() + 1, "d+": date.getDate(), "h+": date.getHours(), "m+": date.getMinutes(), "s+": date.getSeconds(), "q+": Math.floor((date.getMonth() + 3) / 3), "S": date.getMilliseconds() }; if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (date.getFullYear() + "").substr(4 - RegExp.$1.length)); for (let k in o) if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length))); return fmt; } function getRandom(min, max) { return Math.floor(Math.random() * (max - min) + min); } function isRid(str) { if (/^[0-9]+$/.test(str)) { return true; } else { return false; } } function getAvailableSheet(index) { let ret = -1; for (let i = index; i < document.styleSheets.length - index; i++) { if (document.styleSheets[i].href == null) { ret = i; break; } else { ret = -1; } } return ret; } function showMessageWindow(title, content, callback){ if(window.Notification && Notification.permission !== "denied") { Notification.requestPermission(function(status) { var notice_ = new Notification(title, { body: content }); notice_.onclick = function() { callback(); } }); } } function getUserName() { return new Promise(resovle => { fetch('https://www.douyu.com/member/cp',{ method: 'GET', mode: 'no-cors', credentials: 'include', }).then(res => { return res.text(); }).then(txt => { txt = (new DOMParser()).parseFromString(txt, 'text/html'); let ret = txt.getElementsByClassName("uname_con")[0].title; resovle(ret); }).catch(err => { console.error('请求失败', err); }) }) } function initPkg_AdVideo() { initPkg_Sign_Ad_FishPond(); } function initPkg_Sign_Ad_FishPond() { getFishBall_Ad_FishPond(); } function getFishBall_Ad_FishPond() { GM_xmlhttpRequest({ method: "POST", url: "https://apiv2.douyucdn.cn/japi/tasksys/ytxb/userStatusV3?client_sys=android", data: "roomId=" + rid + "&token=" + dyToken, responseType: "json", headers: { "Content-Type": "application/x-www-form-urlencoded" }, onload: async function(response) { let ret = response.response.data.taskList; for (let i = 0; i < ret.length; i++) { if (ret[i].task.id == "182") { if (ret[i].task.status == "3") { // showMessage("【鱼塘鱼丸】已领取", "warning"); // initPkg_Sign_Ad_666(); initPkg_Sign_Ad_Yuba(); } else { let posid_Ad_FishPond = "1114268"; let token = dyToken; let uid = getUID(); let info = await getFishBall_Ad_FishPond_info(posid_Ad_FishPond, token, uid); if (info == false) { // initPkg_Sign_Ad_666(); initPkg_Sign_Ad_Yuba(); return; } let mid = info.mid; let infoBack = info.infoBack; let isStart = await getFishBall_Ad_FishPond_start(posid_Ad_FishPond, token, uid, mid, infoBack); if (isStart == false) { isStart = await getFishBall_Ad_FishPond_start(posid_Ad_FishPond, token, uid, mid, infoBack); if (isStart == false) { isStart = await getFishBall_Ad_FishPond_start(posid_Ad_FishPond, token, uid, mid, infoBack); // 偷个懒,直接三次重试 } } if (isStart == true) { showMessage("【鱼塘鱼丸】开始领取鱼塘鱼丸,需等待15秒", "info"); await sleep(15555).then(async () => { let isFinish = await getFishBall_Ad_FishPond_finish(posid_Ad_FishPond, token, uid, mid, infoBack); if (isFinish == false) { isFinish = await getFishBall_Ad_FishPond_finish(posid_Ad_FishPond, token, uid, mid, infoBack); if (isFinish == false) { isFinish = await getFishBall_Ad_FishPond_finish(posid_Ad_FishPond, token, uid, mid, infoBack); } } if (isFinish == true) { let isGet = await getFishBall_Ad_FishPond_Bubble(token); } }) } // initPkg_Sign_Ad_666(); initPkg_Sign_Ad_Yuba(); } } } } }); } function getFishBall_Ad_FishPond_info(posid_Ad_FishPond, token, uid) { return new Promise(resolve => { GM_xmlhttpRequest({ method: "POST", url: "https://rtbapi.douyucdn.cn/japi/sign/app/getinfo?token=" + token + "&mdid=phone" + "&client_sys=android", data: "posid=" + posid_Ad_FishPond + "&roomid=" + rid + "&cate1=1&cate2=1&chanid=30" + '&device={"nt":"1"}', responseType: "json", headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, onload: function(response) { let ret = response.response; if (ret.error == "0") { if (ret.data.length == 0) { resolve(false); return; } let mid = ret.data[0].mid; let infoBack = encodeURIComponent(JSON.stringify(ret.data)); resolve({mid: mid, infoBack: infoBack}); } } }); }) } function getFishBall_Ad_FishPond_start(posid_Ad_FishPond, token, uid, mid, infoBack) { return new Promise(resolve => { GM_xmlhttpRequest({ method: "POST", url: "https://apiv2.douyucdn.cn/japi/inspire/api/ad/fishpond/mobile/start?client_sys=android", data: "token=" + token + "&uid=" + uid + "&roomId=" + rid + "&posCode=" + posid_Ad_FishPond + "&clientType=1&creativeId=" + mid + "&infoBack=" + infoBack, responseType: "json", headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, onload: function(response) { let ret = response.response; if (ret.error == "0") { resolve(true); } } }); }) } function getFishBall_Ad_FishPond_finish(posid_Ad_FishPond, token, uid, mid, infoBack) { return new Promise(resolve => { GM_xmlhttpRequest({ method: "POST", url: "https://apiv2.douyucdn.cn/japi/inspire/api/ad/fishpond/mobile/finish?client_sys=android", data: "uid=" + uid + "&clientType=1&posCode=" + posid_Ad_FishPond + "&creativeId=" + mid + "&roomId=" + rid + "&token=" + token + "&infoBack=" + infoBack, responseType: "json", headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, onload: function(response) { let ret = response.response; if (ret.error == "0") { resolve(true); } } }); }) } function getFishBall_Ad_FishPond_Bubble(token) { return new Promise(resolve => { GM_xmlhttpRequest({ method: "POST", url: "https://apiv2.douyucdn.cn/japi/tasksys/ytxb/getPrize?client_sys=android", data: "token=" + token + "&id=182", responseType: "json", headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, onload: function(response) { let ret = response.response; if (ret.error == "0") { showMessage("【鱼塘鱼丸】" + ret.data.msg, "success"); } else { showMessage("【鱼塘鱼丸】" + ret.msg, "error"); } resolve(ret.error); } }); }) } function initPkg_Sign_Ad_Guess() { getFishBall_Ad_Guess(); } async function getFishBall_Ad_Guess() { let chance = await getFishBall_Ad_Guess_chance(); if (chance > 0) { for (let i = 0; i < chance; i++) { let adWatchcer = new DyWacthAd("1114337", dyToken, rid); let isStart = await adWatchcer.start(); if (isStart == true) { showMessage("【预言鱼丸】开始领取预言鱼丸,需等待15秒", "info"); await sleep(15555).then(async () => { if (await adWatchcer.finish() == true) { showMessage("【预言鱼丸】成功领取40鱼丸", "success"); } await sleep(1000); }) } } } else { // showMessage("【预言鱼丸】今日次数已用完", "warning"); } } function getFishBall_Ad_Guess_chance() { return new Promise(resolve => { GM_xmlhttpRequest({ method: "POST", url: "https://apiv2.douyucdn.cn/japi/inspire/api/ad/fishpond/mobile/chance?client_sys=android", data: "token=" + dyToken + "&uid=" + getUID() + "&posCode=1114337&clientType=1", responseType: "json", headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, onload: async function(response) { let ret = response.response; if (ret.error == "0") { let chance = ret.data.chanceNum; resolve(chance); } else { resolve(0); } } }); }) } function initPkg_Sign_Ad_Search() { getFishBall_Ad_Search(); } function getFishBall_Ad_Search() { GM_xmlhttpRequest({ method: "POST", url: "https://apiv2.douyucdn.cn/japi/inspire/api/ad/fishpond/mobile/chance?client_sys=android", data: "token=" + dyToken + "&uid=" + getUID() + "&posCode=1124343&clientType=1", responseType: "json", headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, onload: async function(response) { let ret = response.response; if (ret.error == "0") { let chance = ret.data.chanceNum; if (chance > 0) { for (let i = 0; i < chance; i++) { let posid_Ad_Search = "1124343"; let token = dyToken; let uid = getUID(); let info = await getFishBall_Ad_Search_info(posid_Ad_Search, token, uid); if (info == false) { initPkg_Sign_Ad_Guess(); return; } let mid = info.mid; let infoBack = info.infoBack; let isStart = await getFishBall_Ad_Search_start(posid_Ad_Search, token, uid, mid, infoBack); if (isStart == true) { showMessage("【搜索鱼丸】开始领取搜索鱼丸,需等待15秒", "info"); await sleep(15555).then(async () => { let isFinish = await getFishBall_Ad_Search_finish(posid_Ad_Search, token, uid, mid, infoBack); if (isFinish == true) { showMessage("【搜索鱼丸】成功领取40鱼丸", "success"); await sleep(1000); } }) } } } else { // showMessage("【搜索鱼丸】今日次数已用完", "warning"); initPkg_Sign_Ad_Guess(); return; } } initPkg_Sign_Ad_Guess(); } }); } function getFishBall_Ad_Search_info(posid_Ad_Search, token, uid) { return new Promise(resolve => { GM_xmlhttpRequest({ method: "POST", url: "https://rtbapi.douyucdn.cn/japi/sign/app/getinfo?token=" + token + "&mdid=phone" + "&client_sys=android", data: "posid=" + posid_Ad_Search + "&roomid=" + rid + "&cate1=1&cate2=1&chanid=30" + '&device={"nt":"1"}', responseType: "json", headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, onload: function(response) { let ret = response.response; if (ret.error == "0") { if (ret.data.length == 0) { resolve(false); return; } let mid = ret.data[0].mid; let infoBack = encodeURIComponent(JSON.stringify(ret.data)); resolve({mid: mid, infoBack: infoBack}); } } }); }) } function getFishBall_Ad_Search_start(posid_Ad_Search, token, uid, mid, infoBack) { return new Promise(resolve => { GM_xmlhttpRequest({ method: "POST", url: "https://apiv2.douyucdn.cn/japi/inspire/api/ad/fishpond/mobile/start?client_sys=android", data: "token=" + token + "&uid=" + uid + "&roomId=" + rid + "&posCode=" + posid_Ad_Search + "&clientType=1&creativeId=" + mid + "&infoBack=" + infoBack, responseType: "json", headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, onload: function(response) { let ret = response.response; if (ret.error == "0") { resolve(true); } } }); }) } function getFishBall_Ad_Search_finish(posid_Ad_Search, token, uid, mid, infoBack) { return new Promise(resolve => { GM_xmlhttpRequest({ method: "POST", url: "https://apiv2.douyucdn.cn/japi/inspire/api/ad/fishpond/mobile/finish?client_sys=android", data: "uid=" + uid + "&clientType=1&posCode=" + posid_Ad_Search + "&creativeId=" + mid + "&roomId=" + rid + "&token=" + token + "&infoBack=" + infoBack, responseType: "json", headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, onload: function(response) { let ret = response.response; if (ret.error == "0") { if (ret.data == "1") { resolve(true); } } } }); }) } function initPkg_Sign_Ad_Yuba() { getFishBall_Ad_Yuba(); } function getFishBall_Ad_Yuba() { GM_xmlhttpRequest({ method: "POST", url: "https://apiv2.douyucdn.cn/japi/inspire/api/ad/fishpond/mobile/chance?client_sys=android", data: "token=" + dyToken + "&uid=" + getUID() + "&posCode=1042329&clientType=1", responseType: "json", headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, onload: async function(response) { let ret = response.response; if (ret.error == "0") { let chance = ret.data.chanceNum; if (chance > 0) { for (let i = 0; i < chance; i++) { let posid_Ad_Yuba = "1042329"; let token = dyToken; let uid = getUID(); let info = await getFishBall_Ad_Yuba_info(posid_Ad_Yuba, token, uid); if (info == false) { initPkg_Sign_Ad_Search(); return; } let mid = info.mid; let infoBack = info.infoBack; let isStart = await getFishBall_Ad_Yuba_start(posid_Ad_Yuba, token, uid, mid, infoBack); if (isStart == true) { showMessage("【鱼吧鱼丸】开始领取鱼吧鱼丸,需等待15秒", "info"); await sleep(15555).then(async () => { let isFinish = await getFishBall_Ad_Yuba_finish(posid_Ad_Yuba, token, uid, mid, infoBack); if (isFinish == true) { showMessage("【鱼吧鱼丸】成功领取40鱼丸", "success"); await sleep(1000); } }) } } } else { // showMessage("【鱼吧鱼丸】今日次数已用完", "warning"); initPkg_Sign_Ad_Search(); return; } } initPkg_Sign_Ad_Search(); } }); } function getFishBall_Ad_Yuba_info(posid_Ad_Yuba, token, uid) { return new Promise(resolve => { GM_xmlhttpRequest({ method: "POST", url: "https://rtbapi.douyucdn.cn/japi/sign/app/getinfo?token=" + token + "&mdid=phone" + "&client_sys=android", data: "posid=" + posid_Ad_Yuba + "&roomid=" + rid + "&cate1=1&cate2=1&chanid=30" + '&device={"nt":"1"}', responseType: "json", headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, onload: function(response) { let ret = response.response; if (ret.error == "0") { if (ret.data.length == 0) { resolve(false); return; } let mid = ret.data[0].mid; let infoBack = encodeURIComponent(JSON.stringify(ret.data)); resolve({mid: mid, infoBack: infoBack}); } } }); }) } function getFishBall_Ad_Yuba_start(posid_Ad_Yuba, token, uid, mid, infoBack) { return new Promise(resolve => { GM_xmlhttpRequest({ method: "POST", url: "https://apiv2.douyucdn.cn/japi/inspire/api/ad/fishpond/mobile/start?client_sys=android", data: "token=" + token + "&uid=" + uid + "&roomId=" + rid + "&posCode=" + posid_Ad_Yuba + "&clientType=1&creativeId=" + mid + "&infoBack=" + infoBack, responseType: "json", headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, onload: function(response) { let ret = response.response; if (ret.error == "0") { resolve(true); } } }); }) } function getFishBall_Ad_Yuba_finish(posid_Ad_Yuba, token, uid, mid, infoBack) { return new Promise(resolve => { GM_xmlhttpRequest({ method: "POST", url: "https://apiv2.douyucdn.cn/japi/inspire/api/ad/fishpond/mobile/finish?client_sys=android", data: "uid=" + uid + "&clientType=1&posCode=" + posid_Ad_Yuba + "&creativeId=" + mid + "&roomId=" + rid + "&token=" + token + "&infoBack=" + infoBack, responseType: "json", headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, onload: function(response) { let ret = response.response; if (ret.error == "0") { if (ret.data == "1") { resolve(true); } } } }); }) } let timeout; function initPkg_BagInfo() { initPkg_BagInfo_Func(); } function initPkg_BagInfo_Func() { document.getElementsByClassName("BackpackButton")[0].addEventListener("click", function() { clearTimeout(timeout); timeout = setTimeout(() => { if (document.getElementsByClassName("Backpack JS_Backpack").length > 0) { getBagGifts(rid, (ret) => { let chunkNum = ret.data.list.length; if (chunkNum > 0) { let totalPrice = 0; let totalIntimate = 0; for (let i = 0; i < chunkNum; i++) { let chunk = document.getElementsByClassName("Backpack-prop")[i]; let isValuable = ret.data.list[i].isValuable; // 判断是否是有价值的礼物 let expiry = ret.data.list[i].expiry; // 过期时间 let price = ret.data.list[i].price; // 注意这个要除100才是真实价格,否则是亲密度 let intimate = ret.data.list[i].intimate; // 亲密度 let count = ret.data.list[i].count; // 数量 if (isValuable == "1") { totalPrice = totalPrice + Number(price) * Number(count); } totalIntimate = totalIntimate + Number(intimate) * Number(count); let expiryDiv = document.createElement("div"); expiryDiv.className = "bag-info"; expiryDiv.innerHTML = expiry; chunk.insertBefore(expiryDiv, chunk.childNodes[0]); } document.getElementsByClassName("Backpack-space")[0].innerText = "总价值:" + String(Number(totalPrice / 100).toFixed(2)) + " 总亲密度:" + String(totalIntimate); let a = document.getElementsByClassName("Backpack-title")[0]; let b = document.createElement("div"); b.className = "bag-button"; b.id = "Backpack__clearbag"; b.innerText = "清空背包"; a.appendChild(b); document.getElementById("Backpack__clearbag").addEventListener("click", () => { if (confirm("确认清空?") != true) { return; } showMessage("【清空背包】执行中...", "info"); getBagGifts(rid, (ret) => { clearBagGifts(ret, rid); }) }) } }); } }, 500); }); } async function clearBagGifts(bagGiftsJson, room_id) { // 赠送背包内所有的礼物 let chunkNum = bagGiftsJson.data.list.length; if (chunkNum > 0) { for (let i = 0; i < chunkNum; i++) { let gift_id = bagGiftsJson.data.list[i].id; let gift_cnt = bagGiftsJson.data.list[i].count; if (Object.keys(bagGiftsJson.data.list[i].batchInfo).length > 0) { await sleep(100).then(() => { sendGift_bag(gift_id, gift_cnt, room_id); }) } else { for (let j = 0; j < gift_cnt; j++) { await sleep(100).then(() => { sendGift_bag(gift_id, 1, room_id); }) } } } showMessage("【清空背包】执行完毕!", "success"); } else { showMessage("背包礼物为空", "error"); } } let barrageColorArr = []; let barrageArr = []; let barrageColorLength = 0; let barrageLength = 0; let bloopTimer; let barrageOffset = 0; let barrageColorOffset = 0; let isChangeColor = true; let isMatch = false; //是否为赛事直播间 let bloopStopTimer; function initPkg_BarrageLoop() { initPkg_BarrageLoop_Dom(); initPkg_BarrageLoop_Func(); initPkg_BarrageLoop_Set(); } function BarrageLoop_insertModal() { let html = ""; let a = document.createElement("div"); a.className = "bloop"; html += '
'; html += ''; html += ''; html += '
${item.anchorName}:
${item.txt}
${ item.online }${ item.room_name }
${ item.nickname }已播${ formatSeconds(nowTime - Number(item.show_time)) }
排名 | 昵称 | 积分 |
---|---|---|
${ i + 1 } | ${ ret.data[i].id } | ${ ret.data[i].point } |
滤镜