Greasy Fork is available in English.

DouyuEx-斗鱼直播间增强插件

弹幕自动变色防检测循环发送 一键续牌 查看真实人数/查看主播数据 已播时长 一键签到(直播间/车队/鱼吧/客户端) 一键领取鱼粮(宝箱/气泡/任务) 一键寻宝 送出指定数量的礼物 一键清空背包 屏蔽广告 调节弹幕大小 自动更新 同屏画中画/多直播间小窗观看/可在斗鱼看多个平台直播(b站虎牙) 获取真实直播流地址

Verzia zo dňa 20.02.2020. Pozri najnovšiu verziu.

"use strict";
// ==UserScript==
// @name         DouyuEx-斗鱼直播间增强插件
// @namespace    https://github.com/qianjiachun
// @icon         https://s2.ax1x.com/2020/01/12/loQI3V.png
// @version      2020.02.20.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
// @grant        GM_openInTab
// @grant        GM_xmlhttpRequest
// @grant        GM_setClipboard
// ==/UserScript==
"use strict";function _asyncToGenerator(e){return function(){var t=e.apply(this,arguments);return new Promise(function(e,n){function o(i,a){try{var r=t[i](a),s=r.value}catch(e){return void n(e)}if(!r.done)return Promise.resolve(s).then(function(e){o("next",e)},function(e){o("throw",e)});e(s)}return o("next")})}}function initPkg(){initPkg_ExIcon(),initPkg_ExPanel(),initPkg_RemoveAD(),initPkg_RealAudience(),initPkg_Update(),initPkg_PopupPlayer(),initPkg_ExpandTool(),initPkg_BarrageLoop(),initPkg_FansContinue(),initPkg_FishFood(),initPkg_FishPond(),initPkg_Sign()}function initPkg_Timer(){initPkg_FishPond_Timer()}function initTimer(){initPkg_Timer(),exTimer=setInterval(initPkg_Timer,2e4)}function initStyles(){var e=document.createElement("style");e.appendChild(document.createTextNode('\n.bloop {\n\tbackground-color: rgba(255,255,255,0.9);\n\twidth: 100%;\n\theight: 200px;\n\tposition: relative;\n\tbottom: 200px;\n\tdisplay: none;\n}\n\n.bloop__switch {\n\tposition: absolute;\n\tright: 0;\n\tbottom: 0;\n}\n.ex-icon {\n\tdisplay: inline-block;\n\tvertical-align: middle;\n\tmargin-right: 8px;\n}\n.extool {\n\tbackground-color: rgba(255,255,255,0.9);\n\twidth: 100%;\n\theight: 200px;\n\tposition: relative;\n\tbottom: 200px;\n\tdisplay: none;\n}\n\n.extool__switch {\n\tposition: absolute;\n\tright: 0;\n\tbottom: 0;\n}\n.extool__bsize,.extool__sendgift {\n\tmargin-bottom: 5px;\n}\n\n.ex-panel {\n\twidth: 500px;\n\theight: 50px;\n\tposition: absolute;\n\tbottom: 35px;\n\tright: 75px;\n\tbackground-color: rgba(255,255,255,0.9);\n\tdisplay: none;\n\tborder: 2px rgb(234,173,26) solid;\n}\n.ex-panel__wrap {\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\twidth: 100%;\n\theight: 100%;\n}\n.ex-panel__icon {\n\tmargin: 0 10px;\n\tdisplay: block;\n\tposition: relative;\n\tpadding: 5px;\n}\n.ex-panel__tip {\n\tdisplay:none;\n\tbackground:#f00;\n\tborder-radius:50%;\n\twidth:8px;\n\theight:8px;\n\ttop:0px;\n\tright:0px;\n\tposition:absolute;\n}\n.videoDiv {\n    width: 400px;\n    height: 200px;\n    background-color: rgba(255, 255, 255, 0);\n    position: absolute;\n    z-index: 7777;\n}\n\n.videoPlayer {\n    width: 100%;\n    height: 100%;\n    cursor: move;\n}\n\n.videoScale {\n    width: 10px;\n    height: 10px;\n    overflow: hidden;\n    cursor: se-resize;\n    position: absolute;\n    right: 0;\n    bottom: 0;\n    background-color: rgb(231, 57, 57);\n}\n\n.videoInfo {\n    width: 100%;\n    height: 30px;\n    background-color: gray;\n    position: absolute;\n    top: -30px;\n    line-height: 30px;\n}\n\n.videoClose {\n    width: 30px;\n    float: right;\n    color: white;\n}\n\n.videoQn, .videoCDN {\n    margin-left: 5px;\n}\n\n.videoRID {\n    margin: 0px 5px;\n    font-weight: 800;\n    font-size: medium;\n}\n\n#popup-player__prompt {\n    display: none;\n}\n\n.postbird-box-container{width:100%;height:100%;overflow:hidden;position:fixed;top:0;left:0;z-index:9999;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{width:400px;max-width:90%;min-height:170px;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;bottom:0;padding:0;margin: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}\n.real-audience {\n    cursor: pointer;\n}\n/*\n    Notice.css\n*/\n.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}\n\n')),document.head.appendChild(e)}function showExPanel(){var e=document.getElementsByClassName("ex-panel")[0];"block"!=e.style.display?e.style.display="block":e.style.display="none"}function sleep(e){return new Promise(function(t){return setTimeout(t,e)})}function formatSeconds(e){var t=parseInt(e),n=0,o=0;t>60&&(n=parseInt(t/60),t=parseInt(t%60),n>60&&(o=parseInt(n/60),n=parseInt(n%60)));var i=parseInt(t)+"秒";return n>0&&(i=parseInt(n)+"分"+i),o>0&&(i=parseInt(o)+"小时"+i),i}function getStrMiddle(e,t,n){var o=e.match(new RegExp(t+"(.*?)"+n));return!!o&&o[1]}function getToken(){var e=document.cookie;return getStrMiddle(e,"acf_uid=",";")+"_"+getStrMiddle(e,"acf_biz=",";")+"_"+getStrMiddle(e,"acf_stk=",";")+"_"+getStrMiddle(e,"acf_ct=",";")+"_"+getStrMiddle(e,"acf_ltkid=",";")}function getDyDid(){return getStrMiddle(document.cookie,"dy_did=",";")}function showMessage(e,t){new NoticeJs({text:e,type:t,position:"bottomRight"}).show()}function openPage(e,t){GM_openInTab(e,{active:t})}function closePage(){-1!=navigator.userAgent.indexOf("Firefox")||-1!=navigator.userAgent.indexOf("Chrome")?(window.location.href="about:blank",window.close()):(window.opener=null,window.open("","_self"),window.close())}function getQueryString(e){var t=new RegExp("(^|&)"+e+"=([^&]*)(&|$)","i");if(window.location.hash.indexOf("?")<0)return null;var n=window.location.hash.split("?")[1].match(t);return null!=n?decodeURIComponent(n[2]):null}function dateFormat(e,t){var n={"M+":t.getMonth()+1,"d+":t.getDate(),"h+":t.getHours(),"m+":t.getMinutes(),"s+":t.getSeconds(),"q+":Math.floor((t.getMonth()+3)/3),S:t.getMilliseconds()};/(y+)/.test(e)&&(e=e.replace(RegExp.$1,(t.getFullYear()+"").substr(4-RegExp.$1.length)));for(var o in n)new RegExp("("+o+")").test(e)&&(e=e.replace(RegExp.$1,1==RegExp.$1.length?n[o]:("00"+n[o]).substr((""+n[o]).length)));return e}function getRandom(e,t){return Math.floor(Math.random()*(t-e)+e)}function isRid(e){return!!/^[0-9]+$/.test(e)}function initPkg_BarrageLoop(){initPkg_BarrageLoop_Dom(),initPkg_BarrageLoop_Func(),initPkg_BarrageLoop_Set()}function BarrageLoop_insertModal(){var e="",t=document.createElement("div");t.className="bloop",e+="<div><label>弹幕(一行一个):</label></div>",e+='<textarea id="bloop__textarea" rows="5" cols="50"></textarea>',e+='<div><label>速度(ms):</label><input id="bloop__text_speed1" type="text" style="width:50px;text-align:center;" value="2000" />~<input id="bloop__text_speed2" type="text" style="width:50px;text-align:center;" value="3000" /></div>',e+='<div><label>限时(min):</label><input id="bloop__text_stoptime" type="text" style="width:50px;text-align:center;" value="1" /></div>',e+='<div><label><input id="bloop__checkbox_changeColor" type="checkbox" name="checkbox_changeColor" checked>自动变色</label></div>',e+='<div class="bloop__switch"><label><input id="bloop__checkbox_startSend" type="checkbox">开始发送</label></div>',t.innerHTML=e;var n=document.getElementsByClassName("layout-Player-chat")[0];n.insertBefore(t,n.childNodes[0])}function BarrageLoop_insertIcon(){var e=document.createElement("div");e.className="bloop-icon",e.innerHTML='<a class="ex-panel__icon" title="弹幕发送小助手"><svg t="1578572568198" style="display: block;" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="55445" width="32" height="32"><path d="M511.99883605 1020.07740302c-68.78771655 0-135.53209458-13.47788003-198.38074083-40.06106453-60.69004402-25.67037725-115.18953131-62.41203655-161.98371328-109.20738247-46.79418197-46.79301803-83.53700523-101.29366926-109.20621853-161.98371328C15.84497778 645.97776043 2.36709774 579.23105337 2.36709774 510.4445019s13.47904398-135.53209458 40.06106453-198.38074083c25.6692133-60.69004402 62.41203655-115.18953131 109.20621853-161.98371328 46.79534706-46.79418197 101.29366926-83.53700523 161.98371328-109.20621853 62.84864739-26.5831845 129.59418937-40.06106453 198.38074083-40.06106453 68.78771655 0 135.53209458 13.47904398 198.38190592 40.06106453 60.69004402 25.6692133 115.18953131 62.41203655 161.98487723 109.20621853 46.79301803 46.79418197 83.53584128 101.29366926 109.20621853 161.98371328 26.5831845 62.84864739 40.06106453 129.59418937 40.06106453 198.38074083s-13.47788003 135.53325853-40.06106453 198.38074084c-25.67037725 60.69004402-62.41203655 115.19069525-109.20621853 161.98371328-46.79534706 46.79418197-101.29483435 83.53817031-161.98487723 109.20738247C647.53092949 1006.59952413 580.78655147 1020.07740302 511.99883605 1020.07740302zM511.99883605 57.86089358c-249.55500203 0-452.58244437 203.02744235-452.58244437 452.58244437s203.02744235 452.58244437 452.58244437 452.58244438c249.55616597 0 452.58360832-203.02744235 452.58360832-452.58244438C964.58244437 260.88949987 761.55500203 57.86089358 511.99883605 57.86089358z" p-id="55446" fill="#1296db" data-spm-anchor-id="a313x.7781069.0.i24"></path><path d="M322.42598685 461.65355293l-8.51099648 74.46598314 97.86947811 0c-2.85950862 76.59314973-4.9866752 127.6556379-6.38266595 153.18746454-1.42975431 51.06132423-27.65899321 75.16339541-78.72148139 72.33881542-18.45058333 1.39598962-35.47024839 2.12716658-51.06248818 2.12716658-2.85950862-17.02082901-6.38266595-34.77283613-10.63816419-53.19081984 18.41681863 0 35.43764878 0 51.06248817 0 25.53066155 2.82574393 38.99456967-7.77981952 40.42432399-31.9133275 1.39598962-9.9069861 2.12833166-25.53182663 2.12833166-46.80698994 1.39598962-21.27632725 2.12716658-36.86740309 2.12716658-46.80698994l-99.9966447 0 14.89366244-172.33546126 89.3584805 0 0-78.72148138-102.12497636 0 0-48.9353216 151.05913287 0 0 176.5909595L322.42598685 461.65355293zM450.08162475 580.79819435l0-242.54594504 74.46598314 0c-17.0219941-24.10090723-31.91449145-43.25006791-44.67982222-57.44515413l46.80698994-21.27632725c4.25433429 4.25549824 10.63699911 12.06675342 19.14799673 23.40349497 15.5910747 18.45058333 24.79948459 30.51733789 27.65899321 36.16882574l-42.5514917 19.14799673 80.84864796 0c25.53066155-38.29715741 41.8203136-64.5263963 48.93415652-78.72031744l53.19081984 14.89366244c-5.68525255 8.50983253-15.62483939 22.70491762-29.78732487 42.55149169-7.11384291 9.93958685-12.06675342 17.02082901-14.89249849 21.27516331l70.20931982 0 0 242.54594503L620.28991829 580.7970304l0 51.06248818 144.67646806 0 0 48.93415651L620.28991829 680.79367509l0 87.23131392-51.06132423 0 0-87.23131392L428.80646144 680.79367509l0-48.93415651 140.42213376 0 0-51.06248818L450.08162475 580.7970304zM501.14411293 385.0604032l0 53.18965475 68.08331718 0 0-53.18965475L501.14411293 385.0604032zM501.14411293 480.80154965l0 55.31682248 68.08331718 0L569.22743011 480.80154965 501.14411293 480.80154965zM688.37323549 385.0604032l-68.0833172 0 0 53.18965475 68.0833172 0L688.37323549 385.0604032zM620.28991829 480.80154965l0 55.31682248 68.0833172 0L688.37323549 480.80154965 620.28991829 480.80154965z" p-id="55447" fill="#1296db"></path></svg><i id="bloop__tip" class="ex-panel__tip"></i></a>';var t=document.getElementsByClassName("ex-panel__wrap")[0];t.insertBefore(e,t.childNodes[0])}function getBarrageColorArr(){barrageColorArr.length=0,barrageColorLength=0;var e=document.getElementsByClassName("FansBarrageColor-item");if(0==e.length){isMatch=!0;var t=document.getElementsByClassName("MatchSystemFansBarrageSwitcher")[0];void 0!=t?(t.click(),e=document.getElementsByClassName("MatchSystemFansBarrageColor-item")):isMatch=!1}else isMatch=!1;for(var n=0;n<e.length;n++){-1==e[n].className.indexOf("is-lock")&&(barrageColorArr.push(n),barrageColorLength++)}barrageColorLength-=1}function getBarrageArr(){barrageArr.length=0,barrageLength=0;var e=document.getElementById("bloop__textarea").value;barrageArr=e.split("\n"),barrageLength=barrageArr.length-1}function selectBarrageColor(e){var t=void 0;0==isMatch?t=document.getElementsByClassName("FansBarrageColor-item")[e]:(document.getElementsByClassName("MatchSystemFansBarrageSwitcher")[0].click(),t=document.getElementsByClassName("MatchSystemFansBarrageColor-item")[e]),void 0!=t&&t.click()}function sendBarrage(e){document.getElementsByClassName("ChatSend-txt")[0].value=e,document.getElementsByClassName("ChatSend-button")[0].click()}function getSpeed(){var e=document.getElementById("bloop__text_speed1").value,t=document.getElementById("bloop__text_speed2").value;return getRandom(Number(e),Number(t))}function saveData_BarrageLoop(){var e=document.getElementById("bloop__text_speed1").value,t=document.getElementById("bloop__text_speed2").value,n=document.getElementById("bloop__text_stoptime").value;"undefined"==e&&(e=2e3),"undefined"==t&&(t=3e3),"undefined"==n&&(n=5);var o={text:document.getElementById("bloop__textarea").value,speed1:e,speed2:t,stopTime:n,isChangeColor:isChangeColor};localStorage.setItem("ExSave_BarrageLoop",JSON.stringify(o))}function getStopTime(){var e=document.getElementById("bloop__text_stoptime").value;return 60*Number(e)*1e3}function doLoopBarrage(){1==isChangeColor&&(selectBarrageColor(barrageColorOffset),++barrageColorOffset>barrageColorLength&&(barrageColorOffset=0)),sendBarrage(barrageArr[barrageOffset]),barrageOffset++,barrageOffset>barrageLength&&(barrageOffset=0),bloopTimer=setTimeout(doLoopBarrage,getSpeed())}function initPkg_BarrageLoop_Func(){document.getElementsByClassName("bloop-icon")[0].addEventListener("click",function(){var e=document.getElementsByClassName("bloop")[0];"block"!=e.style.display?(e.style.display="block","block"==document.getElementsByClassName("extool")[0].style.display&&(document.getElementsByClassName("extool")[0].style.display="none")):e.style.display="none"}),document.getElementById("bloop__checkbox_changeColor").addEventListener("click",function(){isChangeColor=document.getElementById("bloop__checkbox_changeColor").checked}),document.getElementById("bloop__checkbox_startSend").addEventListener("click",function(){1==document.getElementById("bloop__checkbox_startSend").checked?(barrageOffset=0,barrageColorOffset=0,getBarrageArr(),getBarrageColorArr(),saveData_BarrageLoop(),bloopTimer=setTimeout(doLoopBarrage,getSpeed()),bloopStopTimer=setTimeout(function(){document.getElementById("bloop__checkbox_startSend").checked=!1,clearTimeout(bloopTimer)},getStopTime())):(clearTimeout(bloopTimer),clearTimeout(bloopStopTimer))})}function initPkg_BarrageLoop_Dom(){BarrageLoop_insertModal(),BarrageLoop_insertIcon()}function initPkg_BarrageLoop_Set(){var e=localStorage.getItem("ExSave_BarrageLoop");if(null!=e){var t=JSON.parse(e);void 0==t.speed1&&(t.speed1=2e3),void 0==t.speed2&&(t.speed2=3e3),void 0==t.stopTime&&(t.stopTime=5),document.getElementById("bloop__textarea").value=t.text,document.getElementById("bloop__checkbox_changeColor").checked=t.isChangeColor,isChangeColor=Boolean(t.isChangeColor),document.getElementById("bloop__text_speed1").value=t.speed1,document.getElementById("bloop__text_speed2").value=t.speed2,document.getElementById("bloop__text_stoptime").value=t.stopTime}}function initPkg_ExIcon(){pkg_ExIcon_insertDom(),pkg_ExIcon_initFunc()}function pkg_ExIcon_insertDom(){var e=document.createElement("div");e.className="ex-icon",e.innerHTML='<a title="~ (´• ᵕ •`)*✲"><svg t="1578667843177" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5685" width="30" height="30"><path d="M512 937.353846c-234.732308 0-425.353846-190.621538-425.353846-425.353846 0-17.329231 14.178462-31.507692 31.507692-31.507692h236.307692c17.329231 0 31.507692 14.178462 31.507693 31.507692 0 69.316923 56.713846 126.030769 126.030769 126.030769s126.030769-56.713846 126.030769-126.030769c0-17.329231 14.178462-31.507692 31.507693-31.507692h236.307692c17.329231 0 31.507692 14.178462 31.507692 31.507692 0 234.732308-190.621538 425.353846-425.353846 425.353846zM151.236923 543.507692c15.753846 185.107692 171.716923 330.830769 360.763077 330.83077s345.009231-145.723077 360.763077-330.83077H698.683077C683.716923 632.516923 605.735385 701.046154 512 701.046154s-171.716923-68.529231-186.683077-157.538462H151.236923z" fill="#33363a" p-id="5686"></path><path d="M512 118.153846c-217.403077 0-393.846154 176.443077-393.846154 393.846154h236.307692c0-86.646154 70.892308-157.538462 157.538462-157.538462s157.538462 70.892308 157.538462 157.538462h236.307692c0-217.403077-176.443077-393.846154-393.846154-393.846154z" fill="#d60909" p-id="5687"></path><path d="M905.846154 543.507692H669.538462c-17.329231 0-31.507692-14.178462-31.507693-31.507692 0-69.316923-56.713846-126.030769-126.030769-126.030769s-126.030769 56.713846-126.030769 126.030769c0 17.329231-14.178462 31.507692-31.507693 31.507692H118.153846c-17.329231 0-31.507692-14.178462-31.507692-31.507692 0-234.732308 190.621538-425.353846 425.353846-425.353846s425.353846 190.621538 425.353846 425.353846c0 17.329231-14.178462 31.507692-31.507692 31.507692z m-207.163077-63.015384h174.867692C857.009231 295.384615 701.046154 149.661538 512 149.661538S166.990769 295.384615 151.236923 480.492308h174.867692C340.283077 391.483077 418.264615 322.953846 512 322.953846s171.716923 68.529231 186.683077 157.538462z" fill="#33363a" p-id="5688"></path><path d="M512 701.046154c-103.975385 0-189.046154-85.070769-189.046154-189.046154s85.070769-189.046154 189.046154-189.046154 189.046154 85.070769 189.046154 189.046154-85.070769 189.046154-189.046154 189.046154z m0-315.076923c-69.316923 0-126.030769 56.713846-126.030769 126.030769s56.713846 126.030769 126.030769 126.030769 126.030769-56.713846 126.030769-126.030769-56.713846-126.030769-126.030769-126.030769z" fill="#33363a" p-id="5689"></path><path d="M512 512m-78.769231 0a78.769231 78.769231 0 1 0 157.538462 0 78.769231 78.769231 0 1 0-157.538462 0Z" fill="#33363a" p-id="5690"></path></svg><i id="ex-icon__tip" class="ex-panel__tip"></i></a>';var t=document.getElementsByClassName("PlayerToolbar-Wealth")[0];t.insertBefore(e,t.childNodes[0])}function pkg_ExIcon_initFunc(){document.getElementsByClassName("ex-icon")[0].addEventListener("click",showExPanel)}function ExIcon_showTip(e){var t=document.getElementById("ex-icon__tip");t.style.display=1==e?"block":"none"}function initPkg_ExpandTool(){initPkg_ExpandTool_Dom(),initPkg_ExpandTool_Func(),initPkg_ExpandTool_ClearBag(),initPkg_ExpandTool_SendGift(),initPkg_ExpandTool_BarrageSize()}function initPkg_ExpandTool_Dom(){ExpandTool_insertModal(),ExpandTool_insertIcon()}function ExpandTool_insertModal(){var e=document.createElement("div");e.className="extool";var t=document.getElementsByClassName("layout-Player-chat")[0];t.insertBefore(e,t.childNodes[0])}function ExpandTool_insertIcon(){var e=document.createElement("div");e.className="extool-icon",e.innerHTML='<a class="ex-panel__icon" title="扩展功能"><svg t="1578755163250" style="display: block;" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="16761" width="32" height="32"><path d="M816.784579 684.416257L646.90465 812.225921c-21.984461 16.588275-50.963979-1.898658-50.963979-32.477045l0.299788-183.270465c0-13.890182 6.495409-26.781071 16.987993-33.576268L782.808593 452.779977c21.984461-14.2899 49.16525 4.296963 49.16525 33.676197v165.682896c0 12.990818-5.695974 25.182201-15.189264 32.277187z" fill="#d81e06" p-id="16762"></path><path d="M809.689594 324.970312l-1.698799-2.798022c-8.194208-13.290606-25.681848-17.38771-38.972455-9.293432l-254.819894 156.989041-271.508099-156.689253c-14.090041-8.194208-32.377116-3.297669-40.471395 10.892302l-0.999293 1.698799c-7.794491 13.490465-3.09781 30.878175 10.392654 38.672666l273.806475 158.088264c-2.098517 3.897245-3.297669 8.394067-3.29767 13.190677v321.772572c0 16.288487 13.290606 29.679023 29.679023 29.679023h1.998588c15.588982 0 28.280012-12.790959 28.280011-28.280012V535.821283c0-3.997175-0.799435-7.794491-2.298375-11.192089l260.715727-160.586498c13.190677-8.194208 17.38771-25.781778 9.193502-39.072384z" fill="#d81e06" p-id="16763"></path><path d="M379.993302 708.799023L203.917752 607.170854c-13.790253-7.89442-18.486933-25.681848-10.592514-39.472102l1.099223-1.898658c7.89442-13.790253 25.681848-18.486933 39.472102-10.592513l176.07555 101.62817c13.790253 7.89442 18.486933 25.681848 10.592513 39.472101l-1.099223 1.898658c-7.99435 13.790253-25.681848 18.586863-39.472101 10.592513zM116.079835 738.278187l-27.980224 20.485521c-6.595338 0-19.985874 23.583331-19.985874 16.987993V275.605203c0-6.595338 5.396186-11.991524 11.991525-11.991524h35.974573c6.595338 0 11.991524 5.396186 11.991525 11.991524l-3.797317 464.671572c0 6.495409-1.59887-1.998587-8.194208-1.998588z" fill="#d81e06" p-id="16764"></path><path d="M135.066415 280.102025l-66.053313-4.396893c-3.497528-5.596045 2.897952-27.180789 8.593926-30.578387L461.23588 8.593926c5.596045-3.497528 12.990818-1.698799 16.488346 3.897245l28.879588 28.779659c3.497528 5.596045 3.397599 8.394067-2.298376 11.891595L135.066415 280.102025c-5.596045 3.397599 3.497528 5.596045 0 0zM936.699823 754.866463h-35.974573c-6.595338 0-11.991524-5.396186-11.991524-11.991525V279.502449c0-12.69103 7.094985-10.092866 13.690324-10.092867l34.275773 10.692443c6.595338 0 11.991524 5.396186 11.991525 11.991524l3.997175 485.756669c0 6.695268-9.393361-22.983755-15.9887-22.983755z" fill="#d81e06" p-id="16765"></path><path d="M931.503496 309.581189l-7.094985-8.793785c-2.098517-2.598164-5.596045-3.597457-8.893714-2.897951-8.194208 1.798729-22.584038-11.09216-31.177964-16.388417L517.496115 65.853455c-0.399717-0.199859-0.799435-0.499647-1.099223-0.799435-11.891595-10.492584-59.857693 11.192089-57.859105 6.39548 0.299788-0.799435 0.699506-1.698799 0.899364-2.498235l9.893008-56.460094c0.499647-2.997881 2.498234-5.496115 5.396186-6.595338 16.987993-6.495409 70.050489-4.296963 79.044132 1.299082l378.432525 233.934655c0.399717 0.199859 0.699506 0.499647 1.099223 0.799435 14.189971 12.191383 18.586863 47.266592 13.390536 64.654303-2.098517 6.695268-10.792372 8.394067-15.189265 2.997881zM69.712607 769.256292l41.970336-31.477752c3.297669-5.695974 4.896539-4.496822 10.592513-1.199152l380.231254 224.041648c5.695974 3.297669 28.479871-1.898658 25.182201 3.797316l11.991525 56.260236c-3.297669 5.695974-57.359459 3.497528-62.255998-2.298376L75.008864 782.946616c-5.995762-3.497528-8.793785-7.694562-5.296257-13.690324z" fill="#d81e06" p-id="16766"></path><path d="M518.29555 1020.578658l-26.681142-17.287781c-3.497528-5.596045 0.199859-31.477752 5.795904-34.975279l394.920871-230.037411c5.596045-3.497528 12.990818-1.698799 17.287781-13.690323l43.868994 35.774714c2.698093 23.283543-12.391242 19.08651-17.987287 22.584038l-360.24538 219.045179c-4.79661 13.290606-53.462213 24.282837-56.959741 18.586863z" fill="#d81e06" p-id="16767"></path></svg><i id="extool__tip" class="ex-panel__tip"></i></a>';var t=document.getElementsByClassName("ex-panel__wrap")[0];t.insertBefore(e,t.childNodes[0])}function initPkg_ExpandTool_Func(){document.getElementsByClassName("extool-icon")[0].addEventListener("click",function(){var e=document.getElementsByClassName("extool")[0];"block"!=e.style.display?(e.style.display="block","block"==document.getElementsByClassName("bloop")[0].style.display&&(document.getElementsByClassName("bloop")[0].style.display="none")):e.style.display="none"})}function initPkg_ExpandTool_BarrageSize(){sheetIndex=getAvailableSheet(),-1!=sheetIndex&&document.styleSheets[sheetIndex].addRule(".danmuItem-31f924",""),ExpandTool_BarrageSize_insertDom(),ExpandTool_BarrageSize_insertFunc(),initPkg_ExpandTool_BarrageSize_Set(),setBarrageSize(getBarrageSize())}function ExpandTool_BarrageSize_insertDom(){var e=document.createElement("div");e.className="extool__bsize",e.innerHTML='<label>弹幕大小(默认24px):</label><input id="extool__bsize_value" type="text" style="width:50px;text-align:center;" value="24" /><input style="width:40px;margin-left:10px;" type="button" id="extool__bsize_btn" value="确认" />';var t=document.getElementsByClassName("extool")[0];t.insertBefore(e,t.childNodes[0])}function setBarrageSize(e){var t=document.styleSheets[sheetIndex].rules.length;document.styleSheets[sheetIndex].removeRule(t-1),document.styleSheets[sheetIndex].addRule(".danmuItem-31f924","font-size:"+e+"px !important;")}function getAvailableSheet(){for(var e=-1,t=0;t<document.styleSheets.length;t++){if(null==document.styleSheets[t].href){e=t;break}e=-1}return e}function getBarrageSize(){return document.getElementById("extool__bsize_value").value}function ExpandTool_BarrageSize_insertFunc(){document.getElementById("extool__bsize_btn").addEventListener("click",function(){setBarrageSize(getBarrageSize()),saveData_BarrageSize()})}function saveData_BarrageSize(){var e={size:getBarrageSize()};localStorage.setItem("ExSave_BarrageSize",JSON.stringify(e))}function initPkg_ExpandTool_BarrageSize_Set(){var e=localStorage.getItem("ExSave_BarrageSize");if(null!=e){var t=JSON.parse(e);document.getElementById("extool__bsize_value").value=t.size}}function initPkg_ExpandTool_ClearBag(){ExpandTool_ClearBag_insertDom(),ExpandTool_ClearBag_insertFunc()}function ExpandTool_ClearBag_insertDom(){var e="";e+='<label>背包送礼:[速度并不快,间隔>0.1s]</label><a id="extool__clearbag_showid" style="margin-left:10px;color:blue;" href="javascript:void(0);">礼物id示例</a><br />',e+='<label>礼物ID:</label><input id="extool__clearbag_id" type="text" style="width:50px;text-align:center;margin-right:10px;" value="268" />',e+='<label>数量:</label><input id="extool__clearbag_cnt" type="text" style="width:30px;text-align:center;" value="1" />',e+='<input style="width:40px;margin-left:10px;" type="button" id="extool__clearbag_sendbtn" value="送出" />',e+='<input style="width:60px;margin-left:10px;" type="button" id="extool__clearbag_clearbtn" value="清空背包" />';var t=document.createElement("div");t.className="extool__clearbag",t.innerHTML=e;var n=document.getElementsByClassName("extool")[0];n.insertBefore(t,n.childNodes[0])}function ExpandTool_ClearBag_insertFunc(){document.getElementById("extool__clearbag_sendbtn").addEventListener("click",_asyncToGenerator(regeneratorRuntime.mark(function e(){var t,n,o;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(1==confirm("确认送出?")){e.next=2;break}return e.abrupt("return");case 2:t=document.getElementById("extool__clearbag_id").value,n=Number(document.getElementById("extool__clearbag_cnt").value),showMessage("【背包送礼】执行中...","info"),o=0;case 6:if(!(o<n)){e.next=12;break}return e.next=9,sleep(100).then(function(){sendGift_bag(t,1,rid).then(function(e){"success"!=e.msg&&(showMessage("【背包送礼】"+rid+"赠送失败 "+e.msg,"error"),console.log(rid,e))}).catch(function(e){showMessage("【背包送礼】"+rid+"赠送失败","error"),console.log(rid,e)})});case 9:o++,e.next=6;break;case 12:showMessage("【背包送礼】执行完毕!","success");case 13:case"end":return e.stop()}},e,this)}))),document.getElementById("extool__clearbag_clearbtn").addEventListener("click",function(){1==confirm("确认清空?")&&(showMessage("【清空背包】执行中...","info"),getBagGifts(rid,function(e){clearBagGifts(e,rid)}))}),document.getElementById("extool__clearbag_showid").addEventListener("click",function(){getBagGifts(rid,function(e){var t=e.data.list.length;if(t>0){for(var n=0;n<t;n++){var o=e.data.list[n].id,i=e.data.list[n].name;console.log("【"+i+"】 id:"+o)}
showMessage("请按F12到控制台(console)查看背包礼物id","success")}else showMessage("背包礼物为空","error")})})}function getBagGifts(e,t){fetch("https://www.douyu.com/japi/prop/backpack/web/v1?rid="+e,{method:"GET",mode:"no-cors",credentials:"include",headers:{"Content-Type":"application/x-www-form-urlencoded"}}).then(function(e){return e.json()}).then(function(e){t(e)}).catch(function(e){console.log("请求失败!",e)})}function initPkg_ExpandTool_SendGift(){ExpandTool_SendGift_insertDom(),ExpandTool_SendGift_insertFunc()}function ExpandTool_SendGift_insertDom(){var e="";e+='<label>送礼:[用于打榜,例如送出999个飞机]</label><a style="margin-left:10px;color:blue;" href="http://open.douyucdn.cn/api/RoomApi/room/'+rid+'" target="_blank">礼物id示例</a><br />',e+='<label>礼物ID:</label><input id="extool__sendgift_id" type="text" style="width:50px;text-align:center;margin-right:10px;" value="20000" />',e+='<label>数量:</label><input id="extool__sendgift_cnt" type="text" style="width:30px;text-align:center;" value="1" />',e+='<input style="width:40px;margin-left:10px;" type="button" id="extool__sendgift_btn" value="送出" />';var t=document.createElement("div");t.className="extool__sendgift",t.innerHTML=e;var n=document.getElementsByClassName("extool")[0];n.insertBefore(t,n.childNodes[0])}function ExpandTool_SendGift_insertFunc(){document.getElementById("extool__sendgift_btn").addEventListener("click",function(){if(1==confirm("确认送出?")){for(var e=document.getElementById("extool__sendgift_id").value,t=document.getElementById("extool__sendgift_cnt").value,n=0,o=0,i=0;i<Number(t);i++)!function(i){sendGift_any(e,1,rid).then(function(a){null!=a.data&&"鱼翅不足"!=a.msg?(n+=1,o+=Number(a.data.priceType)):console.log("【送礼】"+e+a.msg),i==Number(t)-1&&(showMessage("【送礼】赠送完毕!详细信息可以在F12控制台查看","success"),console.log("【送礼】赠送完毕!详细信息可以在F12控制台查看"))}).catch(function(e){console.log("请求失败!",e)})}(i);showMessage("【送礼】执行中...","info")}})}function sendGift_any(e,t,n){return fetch("https://www.douyu.com/japi/gift/donate/mainsite/v1",{method:"POST",mode:"no-cors",credentials:"include",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:"giftId="+e+"&giftCount="+t+"&roomId="+n+"&bizExt=%7B%22yzxq%22%3A%7B%7D%7D"}).then(function(e){return e.json()})}function initPkg_ExPanel(){pkg_ExPanel_insertDom()}function pkg_ExPanel_insertDom(){var e=document.createElement("div");e.className="ex-panel",e.innerHTML='<div class="ex-panel__wrap"></div>';var t=document.getElementsByClassName("PlayerToolbar-Wealth")[0];t.insertBefore(e,t.childNodes[0])}function initPkg_FansContinue(){initPkg_FansContinue_Dom(),initPkg_FansContinue_Func()}function initPkg_FansContinue_Dom(){FansContinue_insertIcon()}function FansContinue_insertIcon(){var e=document.createElement("div");e.className="fans-continue",e.innerHTML='<a class="ex-panel__icon" title="一键续牌"><img style="width: 32px;height: 32px;" src="https://gfs-op.douyucdn.cn/dygift/1705/7db9beee246848252f1c7fe916259f4e.png"/><i id="fans-continue__tip" class="ex-panel__tip"></i></a>';var t=document.getElementsByClassName("ex-panel__wrap")[0];t.insertBefore(e,t.childNodes[0])}function initPkg_FansContinue_Func(){document.getElementsByClassName("fans-continue")[0].addEventListener("click",function(){var e=this;fetch("https://www.douyu.com/member/cp/getFansBadgeList",{method:"GET",mode:"no-cors",cache:"default",credentials:"include"}).then(function(e){return e.text()}).then(function(){var t=_asyncToGenerator(regeneratorRuntime.mark(function t(n){var o,i,a,r;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:n=(new DOMParser).parseFromString(n,"text/html"),o=n.getElementsByClassName("fans-badge-list")[0].lastElementChild,i=o.children.length,a=regeneratorRuntime.mark(function t(n){var i;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return i=o.children[n].getAttribute("data-fans-room"),e.next=3,sleep(200).then(function(){sendGift_bag(268,1,i).then(function(e){"success"==e.msg?showMessage("【续牌】"+i+"赠送一根荧光棒成功","success"):(showMessage("【续牌】"+i+"赠送失败 "+e.msg,"error"),console.log(i,e))}).catch(function(e){showMessage("【续牌】"+i+"赠送失败","error"),console.log(i,e)})});case 3:case"end":return e.stop()}},t,e)}),r=0;case 5:if(!(r<i)){t.next=10;break}return t.delegateYield(a(r),"t0",7);case 7:r++,t.next=5;break;case 10:case"end":return t.stop()}},t,e)}));return function(e){return t.apply(this,arguments)}}()).catch(function(e){console.log("请求失败!",e)})})}function sendGift_bag(e,t,n){return fetch("https://www.douyu.com/japi/prop/donate/mainsite/v1",{method:"POST",mode:"no-cors",credentials:"include",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:"propId="+e+"&propCount="+t+"&roomId="+n+"&bizExt=%7B%22yzxq%22%3A%7B%7D%7D"}).then(function(e){return e.json()})}function initPkg_FishFood(){initPkg_FishFood_Dom(),initPkg_FishFood_Func()}function initPkg_FishFood_Dom(){FishFood_insertIcon()}function FishFood_insertIcon(){var e=document.createElement("div");e.className="fish-food",e.innerHTML='<a class="ex-panel__icon" title="一键鱼塘寻宝"><svg t="1578588143670" style="display: block;" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="41610" width="36" height="36"><path d="M961.40146484375 293.77460937500007c0-75.01376953125-60.809765625-135.8244140625-135.82792968750002-135.8244140625H197.86572265625006C122.85107421875006 157.9501953125 62.0439453125 218.76171875000006 62.0439453125 293.77460937500007c0 3.0392578125000003 0.140625 6.0380859375 0.3322265625 9.024609375-0.021093749999999998 0.7083984375-0.09316406249999999 1.4080078125000002-0.09316406249999999 2.13310546875v501.1171875c0 32.4544921875 24.837890625000004 58.78212890625 55.48447265625 58.78212890625h787.9060546875c30.650097656249994 0 55.4888671875-26.32763671875 55.4888671875-58.78212890625v-501.1171875c0-0.71982421875-0.07910156249999999-1.4097656250000001-0.0984375-2.1128906250000004 0.193359375-2.99619140625 0.33749999999999997-6.005566406250001 0.33749999999999997-9.044824218750001z m0 0" fill="#F0B417" p-id="41611"></path><path d="M747.34296875 157.9501953125H276.1033203125c-54.37353515625 0-98.66513671875 42.581250000000004-101.66748046875 96.2033203125h674.56845703125c-3.0005859375-53.62119140625-47.29306640625-96.2033203125-101.661328125-96.2033203125z m0 0" fill="#E13633" p-id="41612"></path><path d="M174.30751953125002 268.28984375000005v154.06259765625h674.8303710937499V268.28984375000005c0-0.53525390625-0.06855468749999999-1.05556640625-0.08964843749999998-1.58642578125 0.144140625-2.0759765625 0.22851562500000003-4.180957031249999 0.23818359375000003-6.30263671875h-675.1318359375c0.00791015625 2.1181640625000004 0.09755859375 4.215234375 0.22587890625 6.28330078125-0.007031249999999999 0.5396484374999999-0.07294921875 1.06171875-0.07294921875 1.6057617187500002z m0 310.728515625v154.07138671875h674.8303710937499V579.0183593749999c0-0.530859375-0.06855468749999999-1.0520507812500002-0.08964843749999998-1.57236328125 0.144140625-2.0926757812499996 0.22851562500000003-4.19501953125 0.23818359375000003-6.317578125h-675.1318359375c0.00791015625 2.1216796875 0.09755859375 4.21435546875 0.22587890625 6.2964843749999995-0.007031249999999999 0.54140625-0.07294921875 1.0529296874999998-0.07294921875 1.59345703125z m0 0" fill="#C91111" p-id="41613"></path><path d="M62 476.5080078125h899.44189453125v44.38740234375H62z" fill="#9F7D0F" p-id="41614"></path><path d="M617.06357421875 349.27314453125l65.11025390625001 200.38271484375002-170.45068359375 123.83613281249998-170.45683593750002-123.83613281249998 65.10673828125-200.38271484375002h210.69052734374998z m0 0" fill="#E9BF53" p-id="41615"></path><path d="M608.48984375 362.46376953125l59.81396484375 184.07285156249998-156.5806640625 113.77177734374999-156.5859375-113.77177734374999 59.808691406250006-184.07285156249998h193.5439453125z m0 0" fill="#F0B417" p-id="41616"></path><path d="M558.7578125 481.31738281249994c0-26.054296875-21.11923828125-47.162988281249994-47.16826171875-47.162988281249994-26.043750000000003 0-47.16474609375 21.10869140625-47.16474609375 47.162988281249994 0 22.40859375 15.650683593749998 41.1275390625 36.60205078125001 45.92900390625l-24.581249999999997 60.795703124999996h69.359765625l-23.90185546875-60.732421875c21.084960937499996-4.70478515625 36.854296875-23.49228515625 36.854296875-45.992285156250006z m0 0" fill="#715F39" p-id="41617"></path></svg><i id="fish-food__tip" class="ex-panel__tip"></i></a>';var t=document.getElementsByClassName("ex-panel__wrap")[0];t.insertBefore(e,t.childNodes[0])}function initPkg_FishFood_Func(){document.getElementsByClassName("fish-food")[0].addEventListener("click",function(){var e=this;fetch("https://www.douyu.com/japi/activepointnc/api/getActivePointInfo",{method:"POST",mode:"no-cors",credentials:"include",headers:{"Content-Type":"application/x-www-form-urlencoded"}}).then(function(e){return e.json()}).then(function(){var t=_asyncToGenerator(regeneratorRuntime.mark(function t(n){var o,i;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(0!=(o=Number(n.data.dailyMaxLotteryTimes)-Number(n.data.usedLotteryCount))){e.next=4;break}return showMessage("【寻宝】今日寻宝次数已到达上限","warning"),e.abrupt("return");case 4:i=0;case 5:if(!(i<o)){e.next=11;break}return e.next=8,sleep(1300).then(function(){fetch("https://www.douyu.com/japi/activepointnc/api/dolottery",{method:"POST",mode:"no-cors",credentials:"include",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:"rid="+rid}).then(function(e){return e.json()}).then(function(e){null!=e.data?0!=Object.keys(e.data).length&&showMessage("【寻宝】"+e.data.msg,"success"):showMessage("【寻宝】"+e.msg,"warning")}).catch(function(e){console.log("请求失败!",e)})});case 8:i++,e.next=5;break;case 11:case"end":return e.stop()}},t,e)}));return function(e){return t.apply(this,arguments)}}())})}function initPkg_FishPond(){initPkg_FishPond_Dom(),initPkg_FishPond_Func()}function initPkg_FishPond_Timer(){initPkg_FishPond_Bubble_Timer(),initPkg_FishPond_Box_Timer(),initPkg_FishPond_Task_Timer()}function initPkg_FishPond_Func(){document.getElementsByClassName("fish-pond")[0].addEventListener("click",function(){initPkg_FishPond_Bubble(),initPkg_FishPond_Box(),initPkg_FishPond_Task()})}function initPkg_FishPond_Dom(){FishPond_insertIcon()}function FishPond_insertIcon(){var e=document.createElement("div");e.className="fish-pond",e.innerHTML='<a class="ex-panel__icon" title="一键领取鱼粮"><svg t="1578572028540" style="display: block;" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="19278" width="36" height="36"><path d="M607.1 900.6c-2.6 0-5.1-0.1-7.7-0.4-19.8-2.3-34.1-13.1-41.8-20.7-24.5 10.2-46.4 11.7-65.3 4.3-16.1-6.3-26.1-17.7-31.5-26-29 8.3-52.4 6.5-69.8-5.2-14-9.5-20.7-23.3-23.8-33.8-22.8 5.6-41.9 3.7-57-5.5-13.6-8.4-20.5-21-23.9-30.1-24.7 1.5-44.3-4.3-58.3-17.3-13.5-12.4-18.4-28.4-20.2-39.4-27.9-1.4-52-20.2-63.8-39.4-8.3-13.4-11.2-27.6-8.7-40.3-10.6-3.6-19-10.7-23.9-20.7-9.3-18.7-5.4-44 9.8-67.6-26.2-36.9-27.2-58-3.7-88.1-10.8-18.4-13.6-36-8.2-52.3 7.5-22.7 28.9-35.8 41.3-41.7 0.9-3.9 3.2-6.4 4.2-7.5 7.8-7.4 20.9-6.3 50.1 4.1 20.1 7.1 47.9 19 82.9 35.1C346 435.2 425.4 475 523.4 526.3c166.8 87.3 332.2 179.1 333.8 180 2.7 1.5 4.7 3.9 5.6 6.9 8.7 27.4 7.3 48.4-4.1 62.2-8 9.7-19.2 13.4-28 14.8 0.6 22.2-5.5 39.1-18.1 50.4-16.3 14.6-38.9 15-51.8 13.7-8 15.7-19.5 26.4-34.4 31.6-25 8.9-52.3-0.7-65.2-6.6-18.1 14.2-36.3 21.3-54.1 21.3z" fill="#66584F" p-id="19279"></path><path d="M840.3 760c-5.6 6.8-17.1 7.2-21 6.8-3.7-0.5-7.4 0.8-10 3.4-2.6 2.6-3.9 6.3-3.4 10 2.6 20.3-0.5 34.6-9.2 42.4-14.1 12.7-40.1 6.8-40.3 6.8-3.4-0.8-6.8-0.1-9.5 1.7 15-40.6 0-65.2 0-65.2-86.6-112.6-198-83-330.9-147.3C282.8 554 275.6 504.1 210.7 479.3c-59-22.5-77.8 5.6-86.1 32.8-0.9-10.9 5.1-19.8 16.5-33 3.6-4.2 3.9-10.2 0.7-14.7-10.3-14.7-13.7-27.7-10.1-38.7 6.6-20.3 34.5-30.1 35.1-30.3 3.2-1.1 5.8-3.5 7.2-6.5 5.6 1.1 15.9 4 33.9 11 21.3 8.2 49.7 20.7 84.7 37.2 59.1 27.8 137.3 67.3 232.4 117.2C672.1 631.5 815.1 710.5 841.4 725c4.5 16.2 4.2 28.6-1.1 35z" fill="#D8D1CE" p-id="19280"></path><path d="M746.9 831c-2 1.3-3.6 3.3-4.6 5.7-5.3 14-13.1 22.7-23.8 26.5-23.1 8.3-52.6-8.4-52.9-8.6-4.5-2.6-10.1-2-13.9 1.4-17.4 15.2-34 22.1-49.3 20.4-19.9-2.2-32-18.3-32-18.4-2.3-3.2-6-5-9.8-5-1.8 0-3.6 0.4-5.2 1.2-21.4 10.4-39.6 12.9-54 7.4-16.9-6.5-23.6-22.5-23.7-22.5-2.3-6-9-9.1-15.1-7-25.5 8.8-45.5 9.1-58.1 0.8-14.9-9.9-16.2-29.7-16.2-29.8-0.2-3.8-2.1-7.2-5.3-9.4-3.1-2.1-7.1-2.6-10.7-1.4-21.4 7.4-38 7.6-49.5 0.7-13.3-8.1-15.9-24.2-15.9-24.3-0.9-6.6-6.9-11.2-13.5-10.3-22.1 2.9-38.7-0.4-49.3-10-14.2-12.8-13.6-33.7-13.6-33.8 0.2-3.6-1.3-7-3.9-9.4-2.7-2.4-6.2-3.5-9.8-3-16.2 2.4-39.6-6.4-52.7-27.7-3.3-5.4-10.2-19.1-2.5-30.2 2.5-3.7 2.9-8.5 0.8-12.4-2.1-4-6.2-6.4-10.6-6.4-9.4 0-15.8-3.4-19.1-10-6-12.1-0.9-32.1 12.6-49.9 3.3-4.3 3.3-10.2 0-14.5-13.3-17.7-19.8-29.1-20.6-39 8.3-27.2 27.1-55.3 86.1-32.8 64.9 24.8 72.1 74.7 205.3 139.2 132.8 64.4 244.3 34.7 330.9 147.3-0.1 0.1 14.9 24.6-0.1 65.2z" fill="#FFFFFF" p-id="19281"></path><path d="M196.1 562c-2.7 0-5.3-1.4-6.8-3.8-16.7-27.5-8.5-46 4.7-54.3 15.4-9.6 37.5-5.8 46.4 8.1 2.4 3.7 1.3 8.7-2.4 11-3.7 2.4-8.7 1.3-11-2.4-4.1-6.5-16.5-8.1-24.4-3.1-8.8 5.5-8.6 17.3 0.6 32.4 2.3 3.8 1.1 8.7-2.7 11-1.5 0.7-2.9 1.1-4.4 1.1zM244.6 671.6c-0.4 0-0.8 0-1.2-0.1-4.4-0.7-7.4-4.8-6.7-9.1 4.9-31.8 23.1-40.7 38.5-38.5 18 2.6 32.4 19.8 30.3 36-0.6 4.4-4.6 7.5-9 6.9-4.4-0.6-7.5-4.6-6.9-9 1-7.6-7.4-16.8-16.7-18.1-14.6-2.1-19.1 16.9-20.4 25.1-0.6 4-4 6.8-7.9 6.8zM558.9 812.5c-3.7 0-7-2.5-7.8-6.2-1-4.3 1.7-8.6 6-9.6 7.5-1.7 13.2-12.8 11.2-21.9-2.2-10.1-13.3-13.9-30.6-10.4-4.3 0.9-8.6-1.9-9.4-6.2s1.9-8.6 6.2-9.4c31.5-6.4 46.2 7.6 49.5 22.8 3.8 17.8-7.3 37.3-23.3 40.9-0.7-0.1-1.3 0-1.8 0zM734.2 797c-2.2 0-4.4-0.9-6-2.7-2.9-3.3-2.6-8.4 0.8-11.3 5.8-5.1 5.5-17.5-0.6-24.6-6.7-7.9-18.4-5.9-31.9 5.4-3.4 2.8-8.4 2.4-11.3-1-2.8-3.4-2.4-8.4 1-11.3 24.7-20.6 44.2-15.3 54.3-3.5 11.8 13.8 11.3 36.2-1 47-1.6 1.3-3.5 2-5.3 2zM389.7 722.4h-0.9c-4.4-0.5-7.6-4.4-7.1-8.8 3.5-32 21.3-41.7 36.8-40.2 18.1 1.8 33.3 18.3 31.8 34.7-0.4 4.4-4.3 7.7-8.7 7.3-4.4-0.4-7.7-4.3-7.3-8.7 0.7-7.7-8.1-16.4-17.5-17.3-14.7-1.4-18.4 17.7-19.3 26-0.3 3.9-3.8 7-7.8 7z" fill="#66584F" p-id="19282"></path><path d="M952.8 648.4c-2.3-27.9-7.7-56.5-17.6-81.7C912.5 509.4 870 293.1 576 201.4c-253.2-78.9-381.2-1.2-453.3 56.6 0 0-22.4 13.7-44.3 40.5 22-60.2 73-91.3 73-91.3 47.4-31.3 196.9-133 460.2-43.4C863.9 249.7 914 450 935.9 505.3c17.7 44.8 20.4 100.9 16.9 143.1z" fill="#FFAEAE" p-id="19283"></path><path d="M952.8 648.4c-2.1 25.6-6.5 46-11.2 55.8-24.7 51.1-64.6 63.5-64.6 63.5-50.8 13.7-72-21.1-72-21.1-63.9-69.6-126.4-80.2-126.4-80.2-22.5-9.8-180.9-18.8-273.6-69.6C276.8 526.5 244.4 410 131.9 418.4c-62.8 4.7-68.8-56.6-59.9-98.1 1.6-7.7 3.8-14.9 6.3-21.8 21.9-26.8 44.3-40.5 44.3-40.5 72.1-57.7 200.2-135.5 453.3-56.6 294.1 91.7 336.5 308 359.2 365.3 10.1 25.2 15.5 53.8 17.7 81.7z" fill="#F96464" p-id="19284"></path><path d="M952.7 647.1c-24 35.3-53.7 44.6-53.7 44.6-50.8 13.7-72-21.1-72-21.1-63.9-69.6-126.4-80.2-126.4-80.2-22.5-9.8-180.9-18.8-273.6-69.6C298.8 450.5 266.4 334 153.9 342.4c-44.2 3.3-60.2-26-62.8-58.2 17.1-17.4 31.5-26.2 31.5-26.2 72.1-57.7 200.2-135.5 453.3-56.6 294.1 91.7 336.5 308 359.2 365.3 9.9 24.8 15.3 52.9 17.6 80.4z" fill="#FF7B7B" p-id="19285"></path><path d="M952.7 647.1c-24 35.3-53.7 44.6-53.7 44.6-50.8 13.7-72-21.1-72-21.1-63.9-69.6-126.4-80.2-126.4-80.2-22.5-9.8-180.9-18.8-273.6-69.6C298.8 450.5 266.4 334 153.9 342.4c-44.2 3.3-60.2-26-62.8-58.2 17.1-17.4 31.5-26.2 31.5-26.2 72.1-57.7 200.2-135.5 453.3-56.6 294.1 91.7 336.5 308 359.2 365.3 9.9 24.8 15.3 52.9 17.6 80.4z" fill="#FF7B7B" p-id="19286"></path><path d="M557.8 162.4l-2.1 11.8c-18.1-3.2-58.3-4.4-103.6-1.1-0.6-0.1-1.2-0.2-1.8-0.2-1.5-0.2-2.9-0.4-4.4-0.6l-2.1-0.3c-1.2-0.1-2.5-0.3-3.8-0.4-1.3-0.2-2.6-0.3-4-0.4-2.6-0.3-5.2-0.6-7.8-0.8-2.6-0.2-5.2-0.5-7.7-0.7-1.6-0.1-3.3-0.3-4.9-0.4-0.5 0-1.1-0.1-1.6-0.1-1.6-0.1-3.2-0.2-4.9-0.3-2.5-0.2-5-0.3-7.5-0.4-1.2-0.1-2.5-0.1-3.7-0.2-2.3-0.1-4.6-0.2-6.8-0.2h-0.5c11.9-1.9 23.3-3.4 33.9-4.5 57.3-6.2 110.4-5.3 133.3-1.2zM726.4 220.7l-2.6 11.7c-29.2-6.4-60.4-9.8-91.8-10.9-1.3-0.5-2.6-1.1-3.9-1.6-2-0.8-4.1-1.6-6.1-2.4-4.2-1.6-8.4-3.2-12.7-4.8-1.1-0.4-2.1-0.8-3.2-1.2-2.2-0.8-4.3-1.6-6.5-2.3 42.9-0.5 86.7 2.7 126.8 11.5zM814.4 289.8l-3.3 10.8c-17.2-5.3-36.6-9.1-58.1-11.4-0.7-0.5-1.5-1.1-2.2-1.6-1.4-1.1-2.9-2.1-4.3-3.2-0.7-0.5-1.5-1.1-2.2-1.6-0.7-0.5-1.5-1.1-2.2-1.6-0.7-0.5-1.5-1.1-2.2-1.6-2-1.4-4-2.8-6-4.1 29.9 1.9 56.5 6.3 79.5 13.2 0.3 0.4 0.7 0.8 1 1.1zM889 393.4c-13.1-5.1-27.8-9.5-43.6-12.9-3.7-4.9-7.5-9.7-11.6-14.6 16.5 3 32 6.9 46.2 11.6 3.2 5.3 6.2 10.6 9 15.9z" fill="#FFD9D9" p-id="19287"></path><path d="M452 173.1c-8.6 0.6-17.3 1.4-26.2 2.4-48.1 5.2-115 17.3-160.4 45-34.4 21-57.8 43.1-69.6 65.7-12.2 23.3-12.4 46.9-0.7 72.1 18.7 40.3 6.4 64.5 2.1 71.2-2.4-1.1-4.8-2.1-7.3-3.1l-3.3-2.7c0.4-0.5 4.1-5.6 5.7-15 2.3-13.2-0.5-28.9-8.1-45.4-25.7-55.5-0.5-107 75-153.1 37.1-22.7 87.6-35.2 131.4-42.2 19.4 0.6 39.8 2.2 61.4 5.1z" fill="#F79494" p-id="19288"></path><path d="M632.1 221.6c-70.4-2.5-141.9 6.4-194.7 18.3-1.1 0.2-111.5 26.8-140 92.6-11.7 26.8-8 57.1 10.8 89.8 16.8 29.3 14.1 52.6 8.9 67-5.7 15.8-15.6 24.5-16 24.9l-7.9-9c1.3-1.2 32-29.2 4.6-76.9-20.8-36.3-24.7-70.1-11.4-100.6 13.1-30.1 42.1-56 86.3-77 32.5-15.4 60.8-22.2 62-22.4 45.4-10.2 104.4-18.3 164.9-19 11.2 3.8 22 8 32.5 12.3z" fill="#F79494" p-id="19289"></path><path d="M753 289.2c-28.6-3.1-60.8-3.5-96.4-1.2-57.1 3.7-102.3 13.1-110.8 15h-0.2c-0.9 0.2-93.8 18.5-125.5 81.1-16.3 32.1-13.9 70.8 7.1 114.9 15.5 32.6 6.9 56.4-3 70.6-10.6 15.2-24.8 22.6-25.4 22.9l-2.8-5.3-2.7-5.3c2.1-1.1 47.8-25.7 23.1-77.7-22.7-47.7-25-90-6.9-125.6 14.3-28.2 42.1-52.3 80.3-69.6 28-12.7 51.7-17.4 53.6-17.8 8.8-1.9 54.8-11.5 112.6-15.2 28-1.8 54-2 77.9-0.5 6.6 4.5 13 9 19.1 13.7z" fill="#F79494" p-id="19290"></path><path d="M845.4 380.4c-17.2-3.8-35.9-6.6-55.6-8.3-41.2-3.6-86.2-2.5-130.1 3.3h-0.1c-0.8 0.1-85.3 10.2-116.5 63.8-16.2 27.8-15.4 63 2.4 104.6 14.2 33.2 15.7 60.5 4.4 80.9-3.7 6.7-8.4 12-13.4 16.1-5.3-1.1-10.7-2.3-16.1-3.6 6.7-3.7 14.1-9.5 19.1-18.5 4.1-7.6 6.1-16.6 5.9-26.8-0.3-12.6-4-27.2-10.9-43.4-19.4-45.3-20-84.1-1.7-115.4 14.3-24.5 40.6-44.3 76.1-57.3 26-9.5 47.8-12.2 49.4-12.3 62.6-8.2 123.9-7.1 175.6 2.4 3.9 4.8 7.8 9.7 11.5 14.5z" fill="#F79494" p-id="19291"></path><path d="M901.1 475.3c-39-11.1-92.5-18.5-165.3-15.3-0.4 0-49.2 3.1-67.3 34.9-12 21.1-8.4 50.5 10.8 87.5 16.4 31.6 20.2 60.9 11.4 87 0 0.1-0.1 0.1-0.1 0.2-6.3-2-10.4-2.8-11.6-3.1 0.1-0.4 0.3-0.7 0.4-1.1 7.7-22.9 4.1-49-10.8-77.5-21.2-40.8-24.7-74.2-10.5-99 8.9-15.7 25.2-27.7 47-34.8 16.1-5.3 29.6-6 30.1-6.1 68.2-3 120.1 3.2 159.3 13.1 2.4 4.8 4.6 9.5 6.6 14.2z" fill="#F79494" p-id="19292"></path><path d="M944.4 595.7c-23.8-13.3-47.6-23.3-67.4-27.9l-0.2-0.1c-0.6-0.2-61.2-16.7-85.7 10.2-14.6 16.1-13.9 45.3 2.2 86.8 9.1 23.5 9.6 44.1 1.6 61.2-1.1 2.3-2.3 4.5-3.6 6.5-3-2.9-6-5.7-9-8.3 0.6-1.1 1.2-2.2 1.8-3.4 6.6-14 5.9-31.3-2-51.6-17.9-46.1-17.8-79.5 0.1-99.2 29.1-32 93.5-14.9 97.7-13.7 17.8 4.2 38.7 12.5 59.9 23.5 1.7 5.1 3.3 10.5 4.6 16z" fill="#F79494" p-id="19293"></path><path d="M452 173.1c-8.6 0.6-17.3 1.4-26.2 2.4-48.1 5.2-115 17.3-160.4 45-34.4 21-57.8 43.1-69.6 65.7-9.9 18.9-11.9 38-6.1 58-4.2-0.8-8.5-1.4-12.9-1.7-11.2-47.5 16.4-91.9 82.3-132.2 37.1-22.7 87.6-35.2 131.4-42.2 19.5 0.5 39.9 2.1 61.5 5zM632.1 221.6c-70.4-2.5-141.9 6.4-194.7 18.3-1.1 0.2-111.5 26.8-140 92.6-11.7 26.8-8 57.1 10.8 89.8 1.3 2.3 2.5 4.5 3.6 6.8-8.8-8.8-17.3-17.4-25.7-25.6-10-27-9.9-52.4 0.3-75.8 13.1-30.1 42.1-56 86.3-77 32.5-15.4 60.8-22.2 62-22.4 45.4-10.2 104.4-18.3 164.9-19 11.2 3.8 22 8 32.5 12.3z" fill="#FFBBBB" p-id="19294"></path><path d="M753 289.2c-28.6-3.1-60.8-3.5-96.4-1.2-57.1 3.7-102.3 13.1-110.8 15h-0.2c-0.9 0.2-93.8 18.5-125.5 81.1-16.3 32.1-13.9 70.8 7.1 114.9 4.5 9.4 6.9 18.1 8 26.1-2.8-1.4-5.5-2.8-8.2-4.3-1.9-1-3.7-2.1-5.5-3.1-1.2-4.3-2.8-8.8-5.1-13.5-22.7-47.7-25-90-6.9-125.6 14.3-28.2 42.1-52.3 80.3-69.6 28-12.7 51.7-17.4 53.6-17.8 8.8-1.9 54.8-11.5 112.6-15.2 28-1.8 54-2 77.9-0.5 6.6 4.5 13 9 19.1 13.7z" fill="#FFBBBB" p-id="19295"></path><path d="M845.4 380.4c-17.2-3.8-35.9-6.6-55.6-8.3-41.2-3.6-86.2-2.5-130.1 3.3h-0.1c-0.8 0.1-85.3 10.2-116.5 63.8-16.2 27.8-15.4 63 2.4 104.6 2.9 6.8 5.3 13.4 7.2 19.7-4.5-1-9-2-13.6-3.1-1.3-3.9-2.9-7.8-4.6-11.9-19.4-45.3-20-84.1-1.7-115.4 14.3-24.5 40.6-44.3 76.1-57.3 26-9.5 47.8-12.2 49.4-12.3 62.6-8.2 123.9-7.1 175.6 2.4 3.9 4.8 7.8 9.7 11.5 14.5z" fill="#FFBBBB" p-id="19296"></path><path d="M901.1 475.3c-39-11.1-92.5-18.5-165.3-15.3-0.4 0-49.2 3.1-67.3 34.9-12 21.1-8.4 50.5 10.8 87.5 0.6 1.1 1.2 2.3 1.7 3.4-4.4-0.8-9.3-1.6-14.7-2.4-19.1-38.8-21.9-70.5-8.2-94.4 8.9-15.7 25.2-27.7 47-34.8 16.1-5.3 29.6-6 30.1-6.1 68.2-3 120.1 3.2 159.3 13.1 2.4 4.7 4.6 9.4 6.6 14.1zM944.4 595.7c-23.8-13.3-47.6-23.3-67.4-27.9l-0.2-0.1c-0.6-0.2-61.2-16.7-85.7 10.2-10.2 11.3-13 28.9-8.2 52.8-4.6-3.4-9.1-6.6-13.6-9.5-2.4-22.1 1.9-39.3 12.8-51.4 29.1-32 93.5-14.9 97.7-13.7 17.8 4.2 38.7 12.5 59.9 23.5 1.8 5.2 3.4 10.6 4.7 16.1z" fill="#FFBBBB" p-id="19297"></path><path d="M409.2 151.6c61.3 0 126.8 11.7 194.6 34.8 51 17.4 96.9 40.9 136.5 70 33.2 24.4 62.6 53.3 87.5 85.9 45.2 59.1 66.2 117.8 78.8 152.9 2.6 7.2 4.8 13.5 6.9 18.8 11.3 28.5 17.2 66.8 16.6 107.6-0.6 36.4-6.2 64-10.1 72-18.4 38.1-46.1 49.6-50 51-5.5 1.4-10.8 2.2-15.7 2.2-8.4 0-15.7-2.1-21.8-6.3-4.1-2.8-6.5-5.8-7.1-6.7l-0.7-1.4-2-2.1c-61.8-67.3-123.4-84-137.2-87-9.3-3.4-24.1-5.7-53.4-10.2-57.6-8.8-153.9-23.6-215.5-57.4-49.5-27.1-84.8-62.5-116-93.8-22.6-22.6-43.9-44-68.1-60.1-28.3-18.8-57.5-27.9-89.3-27.9-4.3 0-8.7 0.2-13.1 0.5-1.7 0.1-3.3 0.2-4.9 0.2-14.3 0-20.2-5.2-23.4-9.1-9.1-11.3-11.7-35.5-6.4-60.3 5.6-26.1 18.6-50.3 38.7-72 15.1-16.3 28.8-25.1 29.7-25.7l0.3-0.2 0.4-0.3 1.5-1c33.8-22.1 112.7-74.4 243.2-74.4m0-24c-139.8 0-224.3 57.3-257.8 79.5 0 0-63.3 38.7-79.3 113.1-8.6 40-3.4 98.4 53.2 98.4 2.1 0 4.4-0.1 6.6-0.3 3.9-0.3 7.7-0.4 11.4-0.4 103.4 0 137.9 110.9 261.8 178.8 92.6 50.8 251.1 59.8 273.6 69.6 0 0 62.4 10.6 126.4 80.2 0 0 14.8 24.3 49.3 24.3 6.8 0 14.3-0.9 22.7-3.2 0 0 39.9-12.4 64.6-63.5 12.4-25.7 22.8-126.9-5.8-198.9-21.9-55.3-72-255.6-324.3-341.5-77.2-26.2-144.5-36.1-202.4-36.1z" fill="#66584F" p-id="19298"></path></svg><i id="fish-pond__tip" class="ex-panel__tip"></i></a>';var t=document.getElementsByClassName("ex-panel__wrap")[0];t.insertBefore(e,t.childNodes[0])}function FishPond_showTip(e){var t=document.getElementById("fish-pond__tip");1==e?"block"!=t.style.display&&(showMessage("【鱼粮】有鱼粮可以领取啦!","info"),t.style.display="block"):t.style.display="none"}function initPkg_FishPond_Box(){getFishPond_Box()}function initPkg_FishPond_Box_Timer(){getFishPond_BoxList()}function getFishPond_Box(){if(0==boxList.length)return void showMessage("【鱼塘宝箱】暂无可领取的鱼粮","info");for(var e=boxList.concat(),t=0;t<e.length;t++)GM_xmlhttpRequest({method:"POST",url:"https://pcapi.douyucdn.cn/japi/tasksys/ytxb/getPrize",data:"id="+e[t]+"&token="+dyToken,responseType:"json",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},onload:function(e){showMessage("【鱼塘宝箱】"+e.response.data.msg,"success")}});FishPond_showTip(!1),boxList.length=0}function getFishPond_BoxList(){GM_xmlhttpRequest({method:"POST",url:"https://pcapi.douyucdn.cn/japi/tasksys/ytxb/box",data:"token="+dyToken,responseType:"json",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},onload:function(e){boxList.length=0;for(var t=0;t<e.response.data.length;t++)null!=e.response.data[t]&&"2"==e.response.data[t].status&&(FishPond_showTip(!0),boxList.push(e.response.data[t].id))}})}function initPkg_FishPond_Bubble(){getFishPond_Bubble()}function initPkg_FishPond_Bubble_Timer(){getFishPond_BubbleList()}function getFishPond_Bubble(){if(0==bubbleList.length)return void showMessage("【鱼塘气泡】暂无可领取的鱼粮","info");for(var e="",t=0;t<bubbleList.length;t++)t!=bubbleList.length-1?e=e+bubbleList[t]+"%2C":e+=bubbleList[t];fetch("https://www.douyu.com/japi/tasksys/ytxb/batchGetPrize",{method:"POST",mode:"no-cors",credentials:"include",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:"ids="+e+"&rid="+rid}).then(function(e){return e.json()}).then(function(e){for(var t="",n=0;n<e.data.length;n++)t=t+e.data[n].num+"个"+e.data[n].name+",";bubbleList.length=0,FishPond_showTip(!1),showMessage("【鱼塘气泡】领取结果:"+t,"success")}).catch(function(e){console.log("请求失败!",e)})}function getFishPond_BubbleList(){fetch("https://www.douyu.com/japi/tasksys/ytxb/bubble",{method:"GET",mode:"no-cors",credentials:"include"}).then(function(e){return e.json()}).then(function(e){bubbleList.length=0;for(var t=0;t<e.data.list.length;t++)null!=e.data.list[t]&&"2"==e.data.list[t].status&&(bubbleList.push(e.data.list[t].id),FishPond_showTip(!0))}).catch(function(e){console.log("请求失败!",e)})}function initPkg_FishPond_Task(){getFishPond_Task()}function initPkg_FishPond_Task_Timer(){getFishPond_TaskList()}function getFishPond_Task(){if(0==taskList.length)return void showMessage("【鱼塘任务】暂无可领取的鱼粮","info");for(var e=taskList.concat(),t=0;t<e.length;t++)fetch("https://www.douyu.com/japi/tasksys/ytxb/getPrize",{method:"POST",mode:"no-cors",credentials:"include",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:"id="+e[t]+"&roomId="+rid}).then(function(e){return e.json()}).then(function(e){showMessage("【鱼塘任务】领取结果:"+e.data.msg,"success")}).catch(function(e){console.log("请求失败!",e)});taskList.length=0,FishPond_showTip(!1)}function getFishPond_TaskList(){taskList.length=0,getFishPond_TaskList_Day(),getFishPond_TaskList_Week(),getFishPond_TaskList_Ytzb()}function getFishPond_TaskList_Day(){fetch("https://www.douyu.com/japi/tasksys/ytxb/userStatusV2?cycleType=1&roomId="+rid,{method:"GET",mode:"no-cors",credentials:"include"}).then(function(e){return e.json()}).then(function(e){for(var t=0;t<e.data.list.length;t++)"2"==e.data.list[t].status&&(FishPond_showTip(!0),taskList.push(e.data.list[t].id))}).catch(function(e){console.log("请求失败!",e)})}function getFishPond_TaskList_Week(){fetch("https://www.douyu.com/japi/tasksys/ytxb/userStatusV2?cycleType=2&roomId="+rid,{method:"GET",mode:"no-cors",credentials:"include"}).then(function(e){return e.json()}).then(function(e){for(var t=0;t<e.data.list.length;t++)"2"==e.data.list[t].status&&(FishPond_showTip(!0),taskList.push(e.data.list[t].id))}).catch(function(e){console.log("请求失败!",e)})}function getFishPond_TaskList_Ytzb(){fetch("https://www.douyu.com/japi/tasksys/ytxb/userStatusV2?cycleType=25&roomId="+rid,{method:"GET",mode:"no-cors",credentials:"include"}).then(function(e){return e.json()}).then(function(e){for(var t=0;t<e.data.list.length;t++)"2"==e.data.list[t].status&&(FishPond_showTip(!0),taskList.push(e.data.list[t].id))}).catch(function(e){console.log("请求失败!",e)})}function initPkg_PopupPlayer(){initPkg_PopupPlayer_Dom(),initPkg_PopupPlayer_Func()}function initPkg_PopupPlayer_Dom(){PopupPlayer_insertIcon(),PopupPlayer_insertPrompt()}function PopupPlayer_insertIcon(){var e=document.createElement("div");e.className="popup-player",e.innerHTML='<a class="ex-panel__icon" title="同屏播放"><svg style="display:block;" t="1579448049771" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1804" width="30" height="30"><path d="M353.024 900.416H109.952c-57.856 0-109.952-46.336-109.952-98.432V153.6c0-52.096 52.096-98.432 109.952-98.432h810.176c57.856 0 104.192 46.336 104.192 98.496v185.472c0 28.928-23.168 52.096-46.336 52.096s-46.272-23.168-46.272-52.096V159.36H98.368V807.68h248.896c34.688 0 52.032 17.408 52.032 46.336 0 28.928-17.344 46.272-46.272 46.272" fill="#f26b1f" p-id="1805"></path><path d="M619.2 631.488c-5.76 0-5.76 5.76-5.76 11.52v223.04c0 5.76 5.76 11.52 5.76 11.52h289.344c5.76 0 11.584-5.76 11.584-11.52v-222.976c0-5.824-5.76-11.584-11.52-11.584H619.136z m289.344 338.688h-289.28a103.68 103.68 0 0 1-104.192-104.128v-222.976c0-57.92 46.272-109.952 104.128-109.952h289.344c57.856 0 104.128 46.272 104.128 109.952v222.976c5.824 57.856-40.448 104.128-104.128 104.128z" fill="#f26b1f" p-id="1806"></path></svg><i id="popup-player__tip" class="ex-panel__tip"></i></a>';var t=document.getElementsByClassName("ex-panel__wrap")[0];t.insertBefore(e,t.childNodes[0])}function PopupPlayer_insertPrompt(){var e=document.createElement("div"),t="";e.className="postbird-box-container",e.id="popup-player__prompt",t+='<div class="postbird-box-dialog">',t+='<div class="postbird-box-content">',t+='<div class="postbird-box-header">',t+='<span class="postbird-box-title"><span>请输入直播间地址:</span></span>',t+="</div>",t+='<div class="postbird-box-text">',t+='<input id="popup-player__url" value="https://www.douyu.com/5189167" style="height:30px;box-sizing:border-box" type="text" class="postbird-prompt-input" autofocus="true">',t+='<label style="margin-right:30px" title="【直播流模式】&#10;1. 速度快&#10;2. 延迟低&#10;3. 占用少&#10;4. 不会进入直播间&#10;5. 支持斗鱼/虎牙/Bilibili"><input id="popup-player__noiframe" type="radio" name="sex" value="无弹幕" checked="checked">无弹幕(推荐)</label>',t+='<label title="【框架模式】&#10;1. 速度慢&#10;2. 占用高&#10;3. 会进入直播间&#10;4. 仅支持斗鱼&#10;此模式拖动不是很灵活,请尽量在标题栏小幅度拖动&#10;若拖动无反应请点击页面任意处触发移动"><input id="popup-player__iframe" type="radio" name="sex" value="有弹幕">有弹幕</label>',t+="</div>",t+='<div class="postbird-box-footer"><button id="popup-player__cancel" class="btn-footer btn-left-footer btn-footer-cancel" style="color:undefined;">取消</button><button id="popup-player__ok" class="btn-footer btn-right-footer btn-footer-ok" style="color:#0e90d2;">确定</button></div></div>',e.innerHTML=t;var n=document.getElementsByClassName("layout-Main")[0];n.insertBefore(e,n.childNodes[0])}function initPkg_PopupPlayer_Func(){document.getElementsByClassName("popup-player")[0].addEventListener("click",function(){document.getElementById("popup-player__prompt").style.display="block"}),document.getElementById("popup-player__cancel").addEventListener("click",function(){document.getElementById("popup-player__prompt").style.display="none"}),document.getElementById("popup-player__ok").addEventListener("click",function(){var e=document.getElementById("popup-player__url").value;if(""!=e){1==document.getElementById("popup-player__noiframe").checked?-1!=e.indexOf("douyu.com")?getRealRid_Douyu(e,function(e){createNewVideo(videoPlayerArr.length,e,"Douyu")}):-1!=e.indexOf("bilibili.com")?getRealRid_Bilibili(e,function(e){createNewVideo(videoPlayerArr.length,e,"Bilibili")}):-1!=e.indexOf("huya.com")&&createNewVideo(videoPlayerArr.length,e,"Huya"):createNewVideo_iframe(videoPlayerArr.length,e)}else showMessage("请输入地址","error");document.getElementById("popup-player__prompt").style.display="none"}),document.getElementById("popup-player__prompt").addEventListener("keydown",function(t){var n=window.event||e;13==(n.keyCode||n.which||n.charCode)&&document.getElementById("popup-player__ok").click()})}function createNewVideo(e,t,n){switch(n){case"Douyu":createNewVideo_Douyu(e,t);break;case"Bilibili":createNewVideo_Bilibili(e,t);break;case"Huya":var o=String(t).split("/");createNewVideo_Huya(e,t,o[o.length-1]);break;default:createNewVideo_Douyu(e,t)}}function setElementVideo(e,t){if(flvjs.isSupported()){var n=document.getElementById("videoPlayer"+String(e)),o=flvjs.createPlayer({type:"flv",url:t},{fixAudioTimestampGap:!1});e>videoPlayerArr.length-1?videoPlayerArr.push(o):videoPlayerArr[e]=o,o.attachMediaElement(n),o.load(),o.play()}}function setElementResize(e){var t=document.getElementById("videoDiv"+String(e));document.getElementById("videoScale"+String(e)).onmousedown=function(e){e.stopPropagation(),e.preventDefault();var n={w:t.offsetWidth,h:t.offsetHeight,x:e.clientX,y:e.clientY},o=void 0,i=void 0;document.onmousemove=function(e){e.stopPropagation(),e.preventDefault(),o=Math.max(300,e.clientX-n.x+n.w),i=Math.max(150,e.clientY-n.y+n.h),o=o>=document.offsetWidth-t.offsetLeft?document.offsetWidth-t.offsetLeft:o,i=i>=document.offsetHeight-t.offsetTop?document.offsetHeight-t.offsetTop:i},document.onmouseup=function(e){e.stopPropagation(),e.preventDefault(),t.style.width=o+"px",t.style.height=i+"px",document.onmousemove=null,document.onmouseup=null}}
}function setElementDrag(e){var t=document.getElementById("videoDiv"+String(e));t.onmousedown=function(e){e.stopPropagation();var n=e.clientX-t.offsetLeft,o=e.clientY-t.offsetTop,i=void 0,a=void 0;document.onmousemove=function(e){e.stopPropagation(),i=e.clientX-n,a=e.clientY-o},document.onmouseup=function(e){e.stopPropagation(),t.style.left=i+"px",t.style.top=a+"px",document.onmousemove=null,document.onmouseup=null}}}function createNewVideo_Douyu(e,t){getRealLive_Douyu(t,!1,"1","1",function(n){if(""!=n||null!=n){if("None"==n)return void showMessage("房间未开播或其他错误","error");var o=String(n).split("/live"),i="";o.length>0&&(i=o[0]);var a=document.createElement("div"),r="";a.id="videoDiv"+String(e),a.rid=t,a.className="videoDiv",r+="<div class='videoInfo' id='videoInfo"+String(e)+"'><a title='复制直播流地址'><span class='videoRID' id='videoRID"+String(e)+"' style='color:white'>斗鱼 - "+t+"</span></a>",r+="<select class='videoQn' id='videoQn"+String(e)+"'><option value='1'>流畅</option><option value='2'>高清</option><option value='3'>超清</option><option value='4'>蓝光4M</option></select>",r+="<select style='display:none' class='videoCDN' id='videoCDN"+String(e)+"'><option value='1'>主线路</option><option value='2'>备用线路5</option><option value='3'>备用线路6</option></select>",r+="<a style='margin-left:5px' href='"+i+"' target='_blank'>无视频?</a>",r+="<a><div class='videoClose' id='videoClose"+String(e)+"'>X</div></a>",r+="</div>",r+="<video controls='controls' class='videoPlayer' id='videoPlayer"+String(e)+"'></video><div class='videoScale' id='videoScale"+String(e)+"'></div>",a.innerHTML=r;var s=document.getElementsByClassName("layout-Main")[0];s.insertBefore(a,s.childNodes[0]),setElementDrag(e),setElementResize(e),setElementFunc_Douyu(e,t),setElementVideo(e,n)}})}function setElementFunc_Douyu(e,t){var n=document.getElementById("videoDiv"+String(e)),o=document.getElementById("videoPlayer"+String(e)),i=document.getElementById("videoInfo"+String(e)),a=document.getElementById("videoScale"+String(e));o.onclick=function(t){t.stopPropagation(),t.preventDefault(),"block"!=a.style.display?(a.style.display="block",i.style.display="block"):(a.style.display="none",i.style.display="none");for(var n=0;n<videoPlayerArr.length;n++){var o=document.getElementById("videoDiv"+String(n));null!=o&&(o.style.zIndex=n==e?7778:7777)}};var r=document.getElementById("videoQn"+String(e)),s=document.getElementById("videoCDN"+String(e)),l=document.getElementById("videoClose"+String(e));r.onchange=function(){getRealLive_Douyu(t,!1,r.value,s.value,function(t){videoPlayerArr[e].destroy(),setElementVideo(e,t)})},s.onchange=function(){getRealLive_Douyu(t,!1,r.value,s.value,function(t){videoPlayerArr[e].destroy(),setElementVideo(e,t)})},l.onclick=function(){n.remove()},document.getElementById("videoRID"+String(e)).onclick=function(){getRealLive_Douyu(t,!1,r.value,s.value,function(e){GM_setClipboard(e),showMessage("复制成功","success")})}}function createNewVideo_Bilibili(e,t){getRealLive_Bilibili(t,"1","1",function(n){if(""!=n||null!=n){var o=document.createElement("div"),i="";o.id="videoDiv"+String(e),o.rid=t,o.className="videoDiv",i+="<div class='videoInfo' id='videoInfo"+String(e)+"'><a title='复制直播流地址'><span class='videoRID' id='videoRID"+String(e)+"' style='color:white'>Bilibili - "+t+"</span></a>",i+="<select class='videoQn' id='videoQn"+String(e)+"'><option value='1'>流畅</option><option value='2'>高清</option><option value='3'>超清</option><option value='4'>蓝光</option><option value='5'>原画</option></select>",i+="<select class='videoCDN' id='videoCDN"+String(e)+"'><option value='1'>主线路</option><option value='2'>备用线路1</option><option value='3'>备用线路2</option><option value='4'>备用线路3</option></select>",i+="<a><div class='videoClose' id='videoClose"+String(e)+"'>X</div></a>",i+="</div>",i+="<video controls='controls' class='videoPlayer' id='videoPlayer"+String(e)+"'></video><div class='videoScale' id='videoScale"+String(e)+"'></div>",o.innerHTML=i;var a=document.getElementsByClassName("layout-Main")[0];a.insertBefore(o,a.childNodes[0]),setElementDrag(e),setElementResize(e),setElementFunc_Bilibili(e,t),setElementVideo(e,n)}})}function setElementFunc_Bilibili(e,t){var n=document.getElementById("videoDiv"+String(e)),o=document.getElementById("videoPlayer"+String(e)),i=document.getElementById("videoInfo"+String(e)),a=document.getElementById("videoScale"+String(e));o.onclick=function(t){t.stopPropagation(),t.preventDefault(),"block"!=a.style.display?(a.style.display="block",i.style.display="block"):(a.style.display="none",i.style.display="none");for(var n=0;n<videoPlayerArr.length;n++){var o=document.getElementById("videoDiv"+String(n));null!=o&&(o.style.zIndex=n==e?7778:7777)}};var r=document.getElementById("videoQn"+String(e)),s=document.getElementById("videoCDN"+String(e)),l=document.getElementById("videoClose"+String(e));r.onchange=function(){getRealLive_Bilibili(t,r.value,s.value,function(t){videoPlayerArr[e].destroy(),setElementVideo(e,t)})},s.onchange=function(){getRealLive_Bilibili(t,r.value,s.value,function(t){videoPlayerArr[e].destroy(),setElementVideo(e,t)})},l.onclick=function(){n.remove()},document.getElementById("videoRID"+String(e)).onclick=function(){getRealLive_Bilibili(t,r.value,s.value,function(e){GM_setClipboard(e),showMessage("复制成功","success")})}}function createNewVideo_Huya(e,t,n){getRealLive_Huya(t,"1","1",function(o,i){if(""!=o||null!=o){if(""!=i)return void showMessage(i,"error");var a=document.createElement("div"),r="";a.id="videoDiv"+String(e),a.rid=t,a.className="videoDiv",r+="<div class='videoInfo' id='videoInfo"+String(e)+"'><a title='复制直播流地址'><span class='videoRID' id='videoRID"+String(e)+"' style='color:white'>Huya - "+n+"</span></a>",r+="<select class='videoQn' id='videoQn"+String(e)+"'><option value='1'>流畅</option><option value='2'>超清</option><option value='3'>蓝光4M</option><option value='4'>原画</option></select>",r+="<select class='videoCDN' id='videoCDN"+String(e)+"'><option value='1'>主线路</option><option value='2'>备用线路1</option><option value='3'>备用线路2</option></select>",r+="<a><div class='videoClose' id='videoClose"+String(e)+"'>X</div></a>",r+="</div>",r+="<video controls='controls' class='videoPlayer' id='videoPlayer"+String(e)+"'></video><div class='videoScale' id='videoScale"+String(e)+"'></div>",a.innerHTML=r;var s=document.getElementsByClassName("layout-Main")[0];s.insertBefore(a,s.childNodes[0]),setElementDrag(e),setElementResize(e),setElementFunc_Huya(e,t),setElementVideo(e,o)}})}function setElementFunc_Huya(e,t){var n=document.getElementById("videoDiv"+String(e)),o=document.getElementById("videoPlayer"+String(e)),i=document.getElementById("videoInfo"+String(e)),a=document.getElementById("videoScale"+String(e));o.onclick=function(t){t.stopPropagation(),t.preventDefault(),"block"!=a.style.display?(a.style.display="block",i.style.display="block"):(a.style.display="none",i.style.display="none");for(var n=0;n<videoPlayerArr.length;n++){var o=document.getElementById("videoDiv"+String(n));null!=o&&(o.style.zIndex=n==e?7778:7777)}};var r=document.getElementById("videoQn"+String(e)),s=document.getElementById("videoCDN"+String(e)),l=document.getElementById("videoClose"+String(e));r.onchange=function(){getRealLive_Huya(t,r.value,s.value,function(t,n){if(""!=n)return void showMessage(n,"error");videoPlayerArr[e].destroy(),setElementVideo(e,t)})},s.onchange=function(){getRealLive_Huya(t,r.value,s.value,function(t,n){if(""!=n)return void showMessage(n,"error");videoPlayerArr[e].destroy(),setElementVideo(e,t)})},l.onclick=function(){n.remove()},document.getElementById("videoRID"+String(e)).onclick=function(){getRealLive_Huya(t,r.value,s.value,function(e,t){if(""!=t)return void showMessage(t,"error");GM_setClipboard(e),showMessage("复制成功","success")})}}function createNewVideo_iframe(e,t){if(-1==String(t).indexOf("douyu.com"))return void showMessage("有弹幕模式仅支持斗鱼直播","error");var n=String(t).split("/"),o=n[n.length-1],i=document.createElement("div"),a="";i.id="videoDiv"+String(e),i.rid=o,i.className="videoDiv",a+="<div class='videoInfo' id='videoInfo"+String(e)+"'><span class='videoRID' id='videoRID"+String(e)+"' style='color:white'>斗鱼 - "+o+"</span>",a+="<a><div class='videoClose' id='videoClose"+String(e)+"'>X</div></a>",a+="</div>",a+="<iframe class='videoPlayer' id='videoPlayer"+String(e)+"' src="+t+"?exid=chun></iframe>",a+="<div class='videoScale' id='videoScale"+String(e)+"'></div>",i.innerHTML=a;var r=document.getElementsByClassName("layout-Main")[0];r.insertBefore(i,r.childNodes[0]),setElementDrag(e),setElementResize(e),e>videoPlayerArr.length-1?videoPlayerArr.push("iframe"):videoPlayerArr[e]="iframe",setElementFunc_iframe(e)}function setElementFunc_iframe(e){var t=document.getElementById("videoDiv"+String(e));document.getElementById("videoClose"+String(e)).onclick=function(){t.remove()},t.onclick=function(t){t.stopPropagation(),t.preventDefault();for(var n=0;n<videoPlayerArr.length;n++){var o=document.getElementById("videoDiv"+String(n));null!=o&&(o.style.zIndex=n==e?7778:7777)}}}function initPkg_RealAudience(){initPkg_RealAudience_Dom(),initPkg_RealAudience_Func(),fetch("https://www.douyu.com/swf_api/h5room/"+rid,{method:"GET",mode:"no-cors",credentials:"include"}).then(function(e){return e.json()}).then(function(e){real_info.showtime=e.data.show_time,real_info.isShow=e.data.show_status,getRealViewer(),setInterval(getRealViewer,3e4)}).catch(function(e){console.log("请求失败!",e)})}function initPkg_RealAudience_Dom(){document.querySelector(".AnchorAnnounce > h3").style.display="none";var e="",t=document.createElement("div");t.className="real-audience",e+="<div id='real-audience__t' style='display: inline-block;margin-right:3px;' title='今日累计观看人数'>"+real_viewIcon+'<span id="real-audience__total" style="color:red">****</span></div>',e+="<div style='display: inline-block;margin-right:3px;' title='弹幕人数'>"+real_danmuIcon+'<span id="real-audience__barrage">****</span></div>',e+="<div id='real-audience__money' style='display: inline-block;margin-right:3px;' title='今日累计礼物价值'>"+real_money_yc+'<span id="real-audience__money_yc">****</span></div>',e+='<span id="real-audience__time" style="float:right">已播:****</span>',t.innerHTML=e;var n=document.getElementsByClassName("AnchorAnnounce")[0];n.insertBefore(t,n.childNodes[0])}function initPkg_RealAudience_Func(){document.getElementsByClassName("AnchorAnnounce")[0].addEventListener("mouseover",function(){document.querySelector(".AnchorAnnounce > h3").style.display="block"}),document.getElementsByClassName("AnchorAnnounce")[0].addEventListener("mouseout",function(){document.querySelector(".AnchorAnnounce > h3").style.display="none"}),document.getElementsByClassName("real-audience")[0].addEventListener("click",function(){openPage("https://www.xiaohulu.com/liveParticularsIndex/2/"+rid,!0)})}function getRealViewer(){null!=document.querySelector(".MatchSystemChatRoomEntry")&&(document.querySelector(".MatchSystemChatRoomEntry").style.display="none"),fetch("https://bojianger.com/data/api/common/search.do?keyword="+rid,{method:"GET"}).then(function(e){return e.json()}).then(function(e){var t=0;t=2==real_info.isShow?0:777==real_info.showtime?0:Math.floor(Date.now()/1e3)-Number(real_info.showtime),real_info.view=e.data.anchorVo.audience_count,real_info.danmu_person_count=e.data.anchorVo.danmu_person_count,real_info.gift_person_count=e.data.anchorVo.gift_person_count,real_info.money_yc=e.data.anchorVo.gift_new_yc,"undefined"==real_info.money_yc||void 0==real_info.money_yc?(real_info.money_yc=0,real_info.money_bag=0,real_info.money_total=0):(real_info.money_bag=e.data.anchorVo.gift_new_bag,real_info.money_total=e.data.anchorVo.yc_gift_value),document.getElementById("real-audience__total").innerText=real_info.view,document.getElementById("real-audience__t").title="总人数:"+real_info.view+" 弹幕人数:"+real_info.danmu_person_count+" 送礼人数:"+real_info.gift_person_count,document.getElementById("real-audience__barrage").innerText=real_info.danmu_person_count,document.getElementById("real-audience__money_yc").innerText=real_info.money_yc,document.getElementById("real-audience__money").title="总礼物价值:"+real_info.money_total+" 鱼翅礼物:"+real_info.money_yc+" 背包礼物:"+real_info.money_bag,document.getElementById("real-audience__time").innerText="已播:"+formatSeconds(t)}).catch(function(e){console.log("请求失败!",e)})}function initPkg_RemoveAD(){var e=setInterval(function(){void 0!=document.getElementsByClassName("PlayerToolbar-wealthNum")[0]&&(removeAD(),clearInterval(e))},1e3);removeAD()}function removeAD(){var e=void 0;if(e=document.getElementsByClassName("recommendAD-54569e")[0],void 0!=e&&e.remove(),e=document.getElementsByClassName("recommendApp-0e23eb")[0],void 0!=e&&e.remove(),e=document.getElementsByClassName("Title-ad")[0],void 0!=e&&e.remove(),e=document.getElementsByClassName("Bottom-ad")[0],void 0!=e&&(e.style.display="none"),e=document.getElementsByClassName("SignBarrage")[0],void 0!=e&&e.remove(),e=document.getElementsByClassName("corner-ad-495ade")[0],void 0!=e&&e.remove(),void 0!=(e=document.getElementsByClassName("SignBaseComponent-sign-ad")))for(var t=0;t<e.length;t++)e[t].remove();e=document.getElementsByClassName("SuperFansBubble")[0],void 0!=e&&e.remove(),void 0!=(e=document.getElementsByClassName("recommendView-3e8b62")[0])&&e.remove()}function initPkg_Sign(){initPkg_Sign_Dom(),initPkg_Sign_Func()}function initPkg_Sign_Func(){document.getElementsByClassName("ex-sign")[0].addEventListener("click",function(){initPkg_Sign_Yuba(),initPkg_Sign_Client(),initPkg_Sign_Motorcade(),initPkg_Sign_Room()})}function initPkg_Sign_Dom(){Sign_insertIcon()}function Sign_insertIcon(){var e=document.createElement("div");e.className="ex-sign",e.innerHTML='<a class="ex-panel__icon" title="一键签到(所有关注的直播间/鱼吧/客户端/车队)"><svg style="display: block;" t="1578566545259" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="12959" width="32" height="32"><path d="M698.368 80.896v114.688c0 23.552 19.968 43.008 44.032 43.008s44.032-19.456 44.032-43.008V80.896c0-23.552-19.968-43.008-44.032-43.008s-44.032 18.944-44.032 43.008zM227.328 80.896v114.688c0 23.552 19.968 43.008 44.032 43.008 24.576 0 44.032-19.456 44.032-43.008V80.896c0-23.552-19.968-43.008-44.032-43.008-24.576 0-44.032 18.944-44.032 43.008z" fill="#F96C5D" p-id="12960"></path><path d="M977.92 195.584c0-23.552-19.968-43.008-44.032-43.008h-88.576v43.008c0 55.296-46.08 100.352-102.912 100.352s-102.912-45.056-102.912-100.352v-43.008H374.272v43.008c0 55.296-46.08 100.352-102.912 100.352-56.832 0-102.912-45.056-102.912-100.352v-43.008H79.872c-24.576 0-44.032 19.456-44.032 43.008v611.328l252.928-145.92-8.192-8.192c-10.24-9.728-16.384-23.552-16.384-38.4 0-29.696 25.088-54.272 55.808-54.272 15.36 0 29.184 6.144 39.424 15.872l28.16 27.648L977.92 263.168V195.584z" fill="#F96C5D" p-id="12961"></path><path d="M329.216 278.528c-5.632 3.584-11.264 6.656-17.408 9.216 5.632-2.56 11.776-5.632 17.408-9.216zM344.064 266.24c4.608-4.608 8.704-9.728 12.8-14.848-3.584 5.632-8.192 10.24-12.8 14.848zM329.216 278.528c5.632-3.584 10.752-7.68 15.36-12.288-5.12 4.608-10.24 8.704-15.36 12.288zM449.536 664.064l220.16-214.016c10.24-9.728 24.064-15.872 39.424-15.872 30.72 0 55.808 24.064 55.808 54.272 0 14.848-6.144 28.672-16.384 38.4l-259.072 252.416c-10.24 9.728-24.064 15.872-39.424 15.872s-29.184-6.144-39.424-15.872l-121.344-118.272L35.84 806.912v104.96c0 23.552 19.968 43.008 44.032 43.008h854.016c24.576 0 44.032-19.456 44.032-43.008V263.168L387.584 603.648l61.952 60.416zM350.72 569.856c-4.608-3.072-9.216-5.12-14.336-6.656 5.12 1.024 10.24 3.584 14.336 6.656zM271.36 295.936c14.336 0 27.648-2.56 39.936-7.68-12.288 4.608-25.6 7.68-39.936 7.68z" fill="#F15A4A" p-id="12962"></path></svg><i id="ex-sign__tip" class="ex-panel__tip"></i></a>';var t=document.getElementsByClassName("ex-panel__wrap")[0];t.insertBefore(e,t.childNodes[0])}function initPkg_Sign_Client(){signClient()}function signClient(){GM_xmlhttpRequest({method:"POST",url:"https://apiv2.douyucdn.cn/h5nc/sign/sendSign",data:"token="+dyToken,responseType:"json",headers:{"Content-Type":"application/x-www-form-urlencoded"},onload:function(e){var t=e.response;if(0==t.data.length)showMessage("【客户端】今日已签到","warning");else if(0!=t.data.sign_pl.length){for(var n="",o=0;o<t.data.sign_pl.length;o++)n=n+t.data.sign_pl[o].cnt+"个"+t.data.sign_pl[o].name+",";showMessage("【客户端】签到成功! 获得物品:"+n,"success")}else showMessage("【客户端】签到成功! 可惜没有获得东西","success")}})}function initPkg_Sign_Motorcade(){signMotorcade()}function signMotorcade(){GM_xmlhttpRequest({method:"GET",url:"https://msgm.douyu.com/mapi/v1.0/motorcade_battle/home",responseType:"json",headers:{"dy-client":"android","dy-token":dyToken},onload:function(e){if(0!=Object.keys(e.response).length&&0!=Object.keys(e.response.data.joined_motorcade).length){var t=encodeURIComponent(e.response.data.joined_motorcade.id);GM_xmlhttpRequest({method:"GET",url:"https://msg.douyu.com/v3/motorcade/signs/weekly?mid="+t,responseType:"json",headers:{"dy-client":"android","dy-token":dyToken},onload:function(e){"1"==e.response.data.is_sign?showMessage("【车队签到】车队已签到","warning"):(showMessage("【车队签到】即将打开车队签到页面","info"),openPage("https://msg.douyu.com/motorcade/#/motorcade/"+t+"/task?total="+String(Number(e.response.data.total)+1)+"&mid="+t+"&exid=chun",!1))}})}}})}function getCookie(e){for(var t="",n=document.cookie,o=n.split("; "),i=0;i<o.length;i++){var a=o[i].split("=");e==a[0]&&(t=a[1])}return""==t&&(t=Math.random().toString(36).substr(2),document.cookie="post-csrfToken="+escape(t)+";path=/"),t}function signMotorcade_Sign(e,t){fetch("https://msg.douyu.com/v3/msign/add?timestamp="+Math.random().toFixed(17),{method:"POST",mode:"cors",credentials:"include",headers:{"dy-device-id":"-","dy-client":"web","dy-csrf-token":getCookie("post-csrfToken"),"Content-Type":"application/x-www-form-urlencoded"},body:"to_mid="+e+"&expression="+t}).then(function(e){return e}).then(function(e){2==Math.floor(e.status_code/100)?console.log("【车队】签到成功"):console.log(e.message),closePage()}).catch(function(e){console.log("请求失败!",e),closePage()})}function initPkg_Sign_Room(){signAllRoom()}function signAllRoom(){var e=0;fetch("https://www.douyu.com/wgapi/livenc/liveweb/follow/list?page=777",{method:"GET",mode:"no-cors",cache:"default",credentials:"include"}).then(function(e){return e.json()}).then(function(t){e=Number(t.data.pageCount);for(var n=1;n<=e;n++)!function(t){fetch("https://www.douyu.com/wgapi/livenc/liveweb/follow/list?page="+String(t),{method:"GET",mode:"no-cors",cache:"default",credentials:"include"}).then(function(e){return e.json()}).then(function(n){for(var o=Number(n.data.list.length),i=0;i<o;i++)signRoom(n.data.list[i].room_id),t==e&&i==o-1&&showMessage("【房间签到】"+n.data.total+"个房间签到已完成!","success")}).catch(function(e){console.log("请求失败!",e)})}(n);showMessage("【房间签到】"+t.data.total+"个房间正在签到中...","info")}).catch(function(e){console.log("请求失败!",e)})}function signRoom(e){GM_xmlhttpRequest({method:"POST",url:"https://apiv2.douyucdn.cn/japi/roomuserlevel/apinc/checkIn",data:"rid="+e,responseType:"json",headers:{"Content-Type":"application/x-www-form-urlencoded",token:dyToken},onload:function(e){}})}function initPkg_Sign_Yuba(){signYubaList()}function signYuba(e,t){GM_xmlhttpRequest({method:"POST",url:"https://yuba.douyu.com/ybapi/topic/sign",data:"group_id="+e,responseType:"json",headers:{"Content-Type":"application/x-www-form-urlencoded",referer:"https://yuba.douyu.com/group/"+e,"dy-client":"pc","dy-token":t},onload:function(t){""==t.response.message?showMessage("【鱼吧】"+e+"签到成功! 连续"+t.response.data.count+"天 获得经验"+t.response.data.exp,"success"):showMessage("【鱼吧】"+e+t.response.message,"warning")}})}function signYubaList(){GM_xmlhttpRequest({method:"GET",url:"https://yuba.douyu.com/wbapi/web/group/myFollow?page=1&limit=999",responseType:"json",headers:{"Content-Type":"application/x-www-form-urlencoded","dy-client":"pc","dy-token":dyToken},onload:function(e){for(var t=0;t<e.response.data.list.length;t++)signYuba(e.response.data.list[t].group_id,dyToken)}})}function initPkg_Update(){initPkg_Update_Dom(),initPkg_Update_Func(),Update_checkVersion()}function initPkg_Update_Dom(){Update_insertIcon()}function Update_insertIcon(){var e=document.createElement("div");e.className="ex-update",e.innerHTML='<a class="ex-panel__icon" title="版本更新"><svg t="1578767541873" style="display:block;" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="23715" width="32" height="32"><path d="M768 810.7H512c-23.6 0-42.7-19.1-42.7-42.7s19.1-42.7 42.7-42.7h256c94.1 0 170.7-76.6 170.7-170.7 0-89.6-70.1-164.3-159.5-170.1L754 383l-10.7-22.7c-42.2-89.3-133-147-231.3-147s-189.1 57.7-231.3 147L270 383l-25.1 1.6c-89.5 5.8-159.5 80.5-159.5 170.1 0 94.1 76.6 170.7 170.7 170.7 23.6 0 42.7 19.1 42.7 42.7s-19.1 42.7-42.7 42.7c-141.2 0-256-114.8-256-256 0-126.1 92.5-232.5 214.7-252.4C274.8 195.7 388.9 128 512 128s237.2 67.7 297.3 174.2C931.5 322.1 1024 428.6 1024 554.7c0 141.1-114.8 256-256 256z" fill="#3688FF" p-id="23716"></path><path d="M554.7 938.7c-10.9 0-21.8-4.2-30.2-12.5l-128-128c-16.7-16.7-16.7-43.7 0-60.3l128-128c16.6-16.7 43.7-16.7 60.3 0 16.7 16.7 16.7 43.7 0 60.3L487 768l97.8 97.8c16.7 16.7 16.7 43.7 0 60.3-8.3 8.4-19.2 12.6-30.1 12.6z" fill="#5F6379" p-id="23717"></path></svg><i id="ex-update__tip" class="ex-panel__tip"></i></a>';var t=document.getElementsByClassName("ex-panel__wrap")[0];t.insertBefore(e,t.childNodes[0])}function initPkg_Update_Func(){document.getElementsByClassName("ex-update")[0].addEventListener("click",Update_openUpdatePage)}function Update_checkVersion(){fetch("https://greasyfork.org/zh-CN/scripts/394497",{method:"GET",mode:"cors",cache:"no-store",credentials:"omit"}).then(function(e){return e.text()}).then(function(e){e=(new DOMParser).parseFromString(e,"text/html");var t=e.getElementsByClassName("script-show-version")[1];void 0!=t&&t.innerText!=curVersion&&Update_showTip(!0)}).catch(function(e){console.error("请求失败",e)})}function Update_openUpdatePage(){openPage("https://greasyfork.org/zh-CN/scripts/394497",!0)}function Update_showTip(e){var t=document.getElementById("ex-update__tip");1==e?"block"!=t.style.display&&(showMessage("【版本更新】插件有新版本,请及时更新~","error"),t.style.display="block"):t.style.display="none"}function hex_md5(e){return binl2hex(core_md5(str2binl(e),e.length*chrsz))}function b64_md5(e){return binl2b64(core_md5(str2binl(e),e.length*chrsz))}function str_md5(e){return binl2str(core_md5(str2binl(e),e.length*chrsz))}function hex_hmac_md5(e,t){return binl2hex(core_hmac_md5(e,t))}function b64_hmac_md5(e,t){return binl2b64(core_hmac_md5(e,t))}function str_hmac_md5(e,t){return binl2str(core_hmac_md5(e,t))}function md5_vm_test(){return"900150983cd24fb0d6963f7d28e17f72"==hex_md5("abc")}function core_md5(e,t){e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;for(var n=1732584193,o=-271733879,i=-1732584194,a=271733878,r=0;r<e.length;r+=16){var s=n,l=o,c=i,d=a;n=md5_ff(n,o,i,a,e[r+0],7,-680876936),a=md5_ff(a,n,o,i,e[r+1],12,-389564586),i=md5_ff(i,a,n,o,e[r+2],17,606105819),o=md5_ff(o,i,a,n,e[r+3],22,-1044525330),n=md5_ff(n,o,i,a,e[r+4],7,-176418897),a=md5_ff(a,n,o,i,e[r+5],12,1200080426),i=md5_ff(i,a,n,o,e[r+6],17,-1473231341),o=md5_ff(o,i,a,n,e[r+7],22,-45705983),n=md5_ff(n,o,i,a,e[r+8],7,1770035416),a=md5_ff(a,n,o,i,e[r+9],12,-1958414417),i=md5_ff(i,a,n,o,e[r+10],17,-42063),o=md5_ff(o,i,a,n,e[r+11],22,-1990404162),n=md5_ff(n,o,i,a,e[r+12],7,1804603682),a=md5_ff(a,n,o,i,e[r+13],12,-40341101),i=md5_ff(i,a,n,o,e[r+14],17,-1502002290),o=md5_ff(o,i,a,n,e[r+15],22,1236535329),n=md5_gg(n,o,i,a,e[r+1],5,-165796510),a=md5_gg(a,n,o,i,e[r+6],9,-1069501632),i=md5_gg(i,a,n,o,e[r+11],14,643717713),o=md5_gg(o,i,a,n,e[r+0],20,-373897302),n=md5_gg(n,o,i,a,e[r+5],5,-701558691),a=md5_gg(a,n,o,i,e[r+10],9,38016083),i=md5_gg(i,a,n,o,e[r+15],14,-660478335),o=md5_gg(o,i,a,n,e[r+4],20,-405537848),n=md5_gg(n,o,i,a,e[r+9],5,568446438),a=md5_gg(a,n,o,i,e[r+14],9,-1019803690),i=md5_gg(i,a,n,o,e[r+3],14,-187363961),o=md5_gg(o,i,a,n,e[r+8],20,1163531501),n=md5_gg(n,o,i,a,e[r+13],5,-1444681467),a=md5_gg(a,n,o,i,e[r+2],9,-51403784),i=md5_gg(i,a,n,o,e[r+7],14,1735328473),o=md5_gg(o,i,a,n,e[r+12],20,-1926607734),n=md5_hh(n,o,i,a,e[r+5],4,-378558),a=md5_hh(a,n,o,i,e[r+8],11,-2022574463),i=md5_hh(i,a,n,o,e[r+11],16,1839030562),o=md5_hh(o,i,a,n,e[r+14],23,-35309556),n=md5_hh(n,o,i,a,e[r+1],4,-1530992060),a=md5_hh(a,n,o,i,e[r+4],11,1272893353),i=md5_hh(i,a,n,o,e[r+7],16,-155497632),o=md5_hh(o,i,a,n,e[r+10],23,-1094730640),n=md5_hh(n,o,i,a,e[r+13],4,681279174),a=md5_hh(a,n,o,i,e[r+0],11,-358537222),i=md5_hh(i,a,n,o,e[r+3],16,-722521979),o=md5_hh(o,i,a,n,e[r+6],23,76029189),n=md5_hh(n,o,i,a,e[r+9],4,-640364487),a=md5_hh(a,n,o,i,e[r+12],11,-421815835),i=md5_hh(i,a,n,o,e[r+15],16,530742520),o=md5_hh(o,i,a,n,e[r+2],23,-995338651),n=md5_ii(n,o,i,a,e[r+0],6,-198630844),a=md5_ii(a,n,o,i,e[r+7],10,1126891415),i=md5_ii(i,a,n,o,e[r+14],15,-1416354905),o=md5_ii(o,i,a,n,e[r+5],21,-57434055),n=md5_ii(n,o,i,a,e[r+12],6,1700485571),a=md5_ii(a,n,o,i,e[r+3],10,-1894986606),i=md5_ii(i,a,n,o,e[r+10],15,-1051523),o=md5_ii(o,i,a,n,e[r+1],21,-2054922799),n=md5_ii(n,o,i,a,e[r+8],6,1873313359),a=md5_ii(a,n,o,i,e[r+15],10,-30611744),i=md5_ii(i,a,n,o,e[r+6],15,-1560198380),o=md5_ii(o,i,a,n,e[r+13],21,1309151649),n=md5_ii(n,o,i,a,e[r+4],6,-145523070),a=md5_ii(a,n,o,i,e[r+11],10,-1120210379),i=md5_ii(i,a,n,o,e[r+2],15,718787259),o=md5_ii(o,i,a,n,e[r+9],21,-343485551),n=safe_add(n,s),o=safe_add(o,l),i=safe_add(i,c),a=safe_add(a,d)}return Array(n,o,i,a)}function md5_cmn(e,t,n,o,i,a){return safe_add(bit_rol(safe_add(safe_add(t,e),safe_add(o,a)),i),n)}function md5_ff(e,t,n,o,i,a,r){return md5_cmn(t&n|~t&o,e,t,i,a,r)}function md5_gg(e,t,n,o,i,a,r){return md5_cmn(t&o|n&~o,e,t,i,a,r)}function md5_hh(e,t,n,o,i,a,r){return md5_cmn(t^n^o,e,t,i,a,r)}function md5_ii(e,t,n,o,i,a,r){return md5_cmn(n^(t|~o),e,t,i,a,r)}function core_hmac_md5(e,t){var n=str2binl(e);n.length>16&&(n=core_md5(n,e.length*chrsz));for(var o=Array(16),i=Array(16),a=0;a<16;a++)o[a]=909522486^n[a],i[a]=1549556828^n[a];var r=core_md5(o.concat(str2binl(t)),512+t.length*chrsz);return core_md5(i.concat(r),640)}function safe_add(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function bit_rol(e,t){return e<<t|e>>>32-t}function str2binl(e){for(var t=Array(),n=(1<<chrsz)-1,o=0;o<e.length*chrsz;o+=chrsz)t[o>>5]|=(e.charCodeAt(o/chrsz)&n)<<o%32;return t}function binl2str(e){for(var t="",n=(1<<chrsz)-1,o=0;o<32*e.length;o+=chrsz)t+=String.fromCharCode(e[o>>5]>>>o%32&n);return t}function binl2hex(e){for(var t=hexcase?"0123456789ABCDEF":"0123456789abcdef",n="",o=0;o<4*e.length;o++)n+=t.charAt(e[o>>2]>>o%4*8+4&15)+t.charAt(e[o>>2]>>o%4*8&15);return n}function binl2b64(e){for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n="",o=0;o<4*e.length;o+=3)for(var i=(e[o>>2]>>o%4*8&255)<<16|(e[o+1>>2]>>(o+1)%4*8&255)<<8|e[o+2>>2]>>(o+2)%4*8&255,a=0;a<4;a++)8*o+6*a>32*e.length?n+=b64pad:n+=t.charAt(i>>6*(3-a)&63);return n}function getRealLive_Bilibili(e,t,n,o){var i="80";switch(t){case"1":i="80";break;case"2":i="150";break;case"3":i="250";break;case"4":i="400";break;case"5":i="10000";break;default:i="80"}GM_xmlhttpRequest({method:"GET",url:"https://api.live.bilibili.com/room/v1/Room/playUrl?cid="+e+"&qn="+i+"&platform=web",responseType:"json",onload:function(e){var t=e.response,i="";i=null!=t.data.durl?t.data.durl[Number(n)].url:"",o(i)}})}function getRealRid_Bilibili(e,t){GM_xmlhttpRequest({method:"GET",url:e,responseType:"text",onload:function(e){var n=e.response,o="";o=getStrMiddle(n,'room_id":',","),o=o.trim(),""==o&&(o="-1"),t(o)}})}function getRealLive_Douyu(e,t,n,o,i){GM_xmlhttpRequest({method:"GET",url:"https://m.douyu.com/"+e,responseType:"text",onload:function(a){var r=a.response.match(/(function ub9.*)[\s\S](var.*)/i),s=String(r[1]).replace(/eval.*;}/,"strc;}"),l=s+String(r[2]),c=dateFormat("yyyyMMdd",new Date),d=String(Math.round((new Date).getTime()/1e3).toString());RealLive_get_sign_url(c,e,d,l,t,n,o,i)}})}function RealLive_get_sign_url(e,t,n,o,i,a,r,s){var l=RealLive_get_sign(t,e,n,o);if(1!=i){var c="v=2501"+e+"&did=10000000000000000000000000001501&tt="+n+"&sign="+l+"&ver=219032101&rid="+t+"&rate=-1";GM_xmlhttpRequest({method:"POST",url:"https://m.douyu.com/api/room/ratestream",data:c,responseType:"json",headers:{"Content-Type":"application/x-www-form-urlencoded","User-Agent":"Mozilla/5.0 (Linux; Android 5.0; SM-G900P Build/LRX21T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Mobile Safari/537.36"},onload:function(e){var t=e.response,n="";if("0"==t.code){var o=t.data.url;if(-1!=String(o).indexOf("mix=1"))n="PKing";else{var i=/live\/(\d{1,8}[0-9a-zA-Z]+)_?[\d]{0,4}\/playlist/i;n=String(o).match(i)[1]}}else n="0";var r="";switch(a){case"1":r="550p";break;case"2":r="1200p";break;case"3":r="2000p";break;case"4":r="4000p";break;default:r="1200p"}var l="";l="0"==n?"None":"https://tx2play1.douyucdn.cn/live/"+n+"_"+r+".flv?uuid=",s(l)}})}else fetch("https://www.douyu.com/lapi/live/getH5Play/"+t,{method:"POST",mode:"no-cors",credentials:"include",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:"v=220120200219&did="+getDyDid()+"&tt="+n+"&sign="+l+"&cdn="+r+"&rate="+a+"&ver=Douyu_220021805&iar=0&ive=0"}).then(function(e){return e.json()}).then(function(e){""!=e.data?s(e.data.rtmp_url+"/"+e.data.rtmp_live):(showMessage(e.msg,"error"),console.log(e.msg))})}function RealLive_get_sign(e,t,n,o){eval1(String(o).replace("ub98484234","ub98484234_ex"),"exScript1");var i=ub98484234_ex(),a=String(i).replace(/\(function[\s\S]*toString\(\)/,"'"),r=hex_md5(e+"10000000000000000000000000001501"+n+"2501"+t),s="function get_sign(){var rb='"+r+a,l=String(s).replace(/return rt;}[\s\S]*/,"return re;};"),c=String(l).replace(/"v=.*&sign="\+/,"");c=String(c).replace("get_sign","get_sign_ex"),eval1(c,"exScript2");var d=get_sign_ex(e+"10000000000000000000000000001501",n);return document.getElementById("exScript1").remove(),document.getElementById("exScript2").remove(),d}function eval1(e,t){var n=document.createElement("script");n.id=t,n.setAttribute("type","text/javascript"),n.appendChild(document.createTextNode(e)),document.body.appendChild(n)}function getRealRid_Douyu(e,t){fetch(e,{method:"GET",mode:"no-cors",cache:"default",credentials:"include"}).then(function(e){return e.text()}).then(function(e){e=(new DOMParser).parseFromString(e,"text/html");var n=e.getElementsByTagName("html")[0].innerHTML,o="$ROOM.room_id =".length,i=n.indexOf("$ROOM.room_id ="),a=n.substring(i+o,n.indexOf(";",i+o));a=a.trim(),1==isRid(a)?t(a):showMessage("获取直播间失败,请检查直播间地址是否正确!","error")}).catch(function(e){console.log("请求失败!",e)})}function getRealLive_Huya(e,t,n,o){var i="500";switch(t){case"1":i="500";break;case"2":i="2500";break;case"3":i="4500";break;case"4":i="0";break;default:i="500"}var a=Number(n)-1;GM_xmlhttpRequest({method:"GET",url:e,responseType:"text",onload:function(e){var t=String(e.response),n="",r="",s="",l="",c="",d="";if("ON"==getStrMiddle(t,'"state":"','",')){var u="hyPlayerConfig = ".length,p=t.indexOf("hyPlayerConfig = "),m=JSON.parse(t.substring(p+u,t.indexOf("};",p+u))+"}");null!=m.stream&&(m.stream.data[0].gameStreamInfoList.length>=a?(s=m.stream.data[0].gameStreamInfoList[a].sFlvUrl,s=String(s).replace("http","https"),l=m.stream.data[0].gameStreamInfoList[a].sStreamName,c=m.stream.data[0].gameStreamInfoList[a].sFlvUrlSuffix,d=m.stream.data[0].gameStreamInfoList[a].sFlvAntiCode,n=s+"/"+l+"."+c+"?"+d,n=n.replace(/amp;/g,""),"0"!=i&&(n=n+"&ratio="+i)):r="暂无该线路")}else r="该房间未开播";o(n,r)}})}var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},clearBagGifts=function(){var e=_asyncToGenerator(regeneratorRuntime.mark(function e(t,n){var o,i,a,r=this;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!((o=t.data.list.length)>0)){e.next=12;break}i=regeneratorRuntime.mark(function e(o){var i,a,s
;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(i=t.data.list[o].id,a=t.data.list[o].count,!(Object.keys(t.data.list[o].batchInfo).length>0)){e.next=7;break}return e.next=5,sleep(100).then(function(){sendGift_bag(i,a,n)});case 5:e.next=14;break;case 7:s=0;case 8:if(!(s<a)){e.next=14;break}return e.next=11,sleep(100).then(function(){sendGift_bag(i,1,n)});case 11:s++,e.next=8;break;case 14:case"end":return e.stop()}},e,r)}),a=0;case 4:if(!(a<o)){e.next=9;break}return e.delegateYield(i(a),"t0",6);case 6:a++,e.next=4;break;case 9:showMessage("【清空背包】执行完毕!","success"),e.next=13;break;case 12:showMessage("背包礼物为空","error");case 13:case"end":return e.stop()}},e,this)}));return function(t,n){return e.apply(this,arguments)}}();!function(){if("msg.douyu.com"==window.location.host)"chun"==getQueryString("exid")&&signMotorcade_Sign(getQueryString("mid"),getQueryString("total"));else if(-1!=String(location.href).indexOf("exid=chun"))var e=setInterval(function(){if(void 0!==document.querySelector("div.wfs-2a8e83")){document.querySelector("div.wfs-2a8e83").click(),document.querySelector("label.layout-Player-asidetoggleButton").click();var t=document.querySelectorAll(".tip-e3420a > ul > li").length;document.querySelectorAll(".tip-e3420a > ul > li")[t-1].click(),clearInterval(e)}},1e3);else var t=setInterval(function(){void 0!==document.getElementsByClassName("ChatToolBar")[0]&&(setTimeout(function(){initStyles(),initPkg(),initTimer()},1e3),clearInterval(t))},1e3)}();var exTimer=0,url=document.getElementsByTagName("html")[0].innerHTML,urlLen="$ROOM.room_id =".length,ridPos=url.indexOf("$ROOM.room_id ="),rid=url.substring(ridPos+urlLen,url.indexOf(";",ridPos+urlLen));rid=rid.trim();var dyToken=getToken(),barrageColorArr=[],barrageArr=[],barrageColorLength=0,barrageLength=0,bloopTimer=void 0,barrageOffset=0,barrageColorOffset=0,isChangeColor=!0,isMatch=!1,bloopStopTimer=void 0,sheetIndex=0,boxList=[],bubbleList=[],taskList=[],videoPlayerArr=[],real_viewIcon='<svg style="width:16px;height:16px" t="1566119680547" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3494" width="128" height="128"><path d="M712.820909 595.224609C807.907642 536.686746 870.40537 437.74751 870.40537 325.549212 870.400378 145.753547 709.943392 0 511.997503 0 314.055363 0 153.599626 145.753547 153.599626 325.549212 153.599626 437.74751 216.092361 536.686746 311.179092 595.219615 149.961841 657.72608 31.268214 793.205446 5.334335 955.968198 1.926253 962.195123 0 969.212275 0 976.638899 0 1002.324352 22.919038 1023.151098 51.198627 1023.151098 79.476967 1023.151098 102.396005 1002.324352 102.396005 976.638899L102.396005 1023.151098C102.396005 817.669984 285.787009 651.099674 511.997503 651.099674 738.212992 651.099674 921.602746 817.669984 921.602746 1023.151098L921.602746 976.638899C921.602746 1002.324352 944.523034 1023.151098 972.801376 1023.151098 1001.07472 1023.151098 1024 1002.324352 1024 976.638899 1024 969.212275 1022.073747 962.195123 1018.659424 955.968198 992.731789 793.205446 874.038157 657.72608 712.820909 595.224609ZM511.997503 558.080262C370.618285 558.080262 256.000624 453.967732 256.000624 325.545467 256.000624 197.121954 370.618285 93.009424 511.997503 93.009424 653.386707 93.009424 767.993133 197.121954 767.993133 325.545467 767.993133 453.972726 653.386707 558.080262 511.997503 558.080262L511.997503 558.080262Z" p-id="3495"></path></svg>',real_danmuIcon='<svg t="1576951281876" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6314" width="16" height="16"><path d="M500.622222 324.266667s0 5.688889-5.688889 5.688889v62.577777h91.022223v-56.888889H506.311111c-5.688889-17.066667-5.688889-17.066667-5.688889-11.377777zM733.866667 324.266667c5.688889 0 0-5.688889 0 0h-91.022223v56.888889h91.022223v-56.888889zM494.933333 523.377778c0 5.688889 0 5.688889 5.688889 5.688889 0 0 5.688889 0 5.688889 5.688889h79.644445v-56.888889H494.933333v45.511111zM733.866667 529.066667v-51.2h-91.022223v56.888889h85.333334c5.688889 0 5.688889 0 5.688889-5.688889z" p-id="6315" fill="#1296db"></path><path d="M796.444444 0H227.555556C102.4 0 0 102.4 0 227.555556v568.888888c0 125.155556 102.4 227.555556 227.555556 227.555556h568.888888c125.155556 0 227.555556-102.4 227.555556-227.555556V227.555556c0-125.155556-102.4-227.555556-227.555556-227.555556zM381.155556 711.111111c-5.688889 34.133333-11.377778 56.888889-22.755556 73.955556-11.377778 17.066667-22.755556 34.133333-34.133333 39.822222s-28.444444 11.377778-45.511111 11.377778c-17.066667 0-39.822222-5.688889-62.577778-22.755556-17.066667-11.377778-28.444444-17.066667-34.133334-28.444444-5.688889-11.377778-5.688889-22.755556 5.688889-39.822223 5.688889-11.377778 11.377778-17.066667 22.755556-17.066666s22.755556 0 34.133333 11.377778c11.377778 5.688889 17.066667 11.377778 22.755556 17.066666 5.688889 0 11.377778 5.688889 17.066666 0 5.688889 0 11.377778-5.688889 11.377778-5.688889 5.688889-5.688889 5.688889-11.377778 11.377778-17.066666 5.688889-11.377778 5.688889-22.755556 5.688889-39.822223 0-17.066667 5.688889-39.822222 5.688889-73.955555 0-11.377778 0-22.755556-5.688889-22.755556 0-5.688889-11.377778 0-11.377778 0H210.488889c-5.688889 0-17.066667-5.688889-22.755556-11.377777-5.688889-5.688889-5.688889-11.377778-11.377777-22.755556v-39.822222l11.377777-91.022222c0-11.377778 5.688889-22.755556 5.688889-34.133334 0-11.377778 5.688889-17.066667 11.377778-22.755555 5.688889-5.688889 11.377778-11.377778 17.066667-11.377778 5.688889 0 17.066667-5.688889 28.444444-5.688889h51.2c5.688889 0 11.377778 0 11.377778-5.688889 0 0 5.688889-5.688889 5.688889-17.066667v-39.822222s0-11.377778-5.688889-17.066666l-11.377778-11.377778H210.488889c-11.377778 0-22.755556 0-28.444445-5.688889-5.688889-5.688889-5.688889-17.066667-5.688888-28.444445 0-17.066667 5.688889-22.755556 11.377777-28.444444 5.688889-5.688889 17.066667-5.688889 28.444445-22.755556h108.088889c22.755556 11.377778 39.822222 17.066667 45.511111 34.133334 11.377778 11.377778 5.688889 56.888889 5.688889 56.888889V341.333333c0 28.444444-5.688889 51.2-17.066667 62.577778-11.377778 11.377778-22.755556 17.066667-45.511111 17.066667h-56.888889c-5.688889 0-11.377778 0-17.066667 5.688889 0 0-5.688889 5.688889-5.688889 11.377777l-5.688888 56.888889v11.377778h91.022222s22.755556 5.688889 28.444444 5.688889c5.688889 0 17.066667 5.688889 17.066667 11.377778s11.377778 11.377778 11.377778 22.755555 5.688889 22.755556 5.688889 39.822223c5.688889 51.2 5.688889 91.022222 0 125.155555z m455.111111 17.066667c-5.688889 5.688889-22.755556 11.377778-34.133334 17.066666h-125.155555v62.577778c-17.066667 17.066667-22.755556 28.444444-28.444445 34.133334-5.688889 5.688889-17.066667 11.377778-34.133333 11.377777-11.377778 0-22.755556-5.688889-28.444444-11.377777-5.688889-5.688889-11.377778-17.066667 0-34.133334v-62.577778H420.977778c-5.688889-11.377778-11.377778-11.377778-11.377778-11.377777-5.688889 0-5.688889-5.688889-5.688889-11.377778v-22.755556c-5.688889-17.066667-5.688889-28.444444 5.688889-34.133333 5.688889-5.688889 17.066667-5.688889 34.133333-11.377778h142.222223v-56.888889H500.622222c-22.755556 0-45.511111-5.688889-51.2-17.066666-11.377778-11.377778-11.377778-28.444444-11.377778-56.888889V312.888889c0-28.444444 5.688889-45.511111 17.066667-56.888889 11.377778-11.377778 28.444444-17.066667 51.2-17.066667 0 0 0-5.688889-5.688889-5.688889L494.933333 227.555556c-11.377778-17.066667-11.377778-22.755556-11.377777-34.133334 0-11.377778 5.688889-17.066667 17.066666-28.444444 11.377778-5.688889 22.755556-11.377778 34.133334-11.377778 11.377778 0 22.755556 11.377778 28.444444 22.755556 5.688889 11.377778 5.688889 22.755556 11.377778 34.133333 5.688889 11.377778 11.377778 17.066667 11.377778 28.444444h79.644444c11.377778-11.377778 17.066667-17.066667 17.066667-28.444444 5.688889-11.377778 11.377778-17.066667 11.377777-28.444445 5.688889-17.066667 17.066667-22.755556 22.755556-28.444444 11.377778-5.688889 17.066667 0 28.444444 5.688889s17.066667 17.066667 22.755556 22.755555c5.688889 11.377778 0 22.755556-5.688889 34.133334 0 5.688889-5.688889 5.688889-5.688889 11.377778s-5.688889 5.688889-5.688889 11.377777c22.755556 0 39.822222 5.688889 51.2 17.066667 11.377778 11.377778 11.377778 28.444444 11.377778 56.888889v204.8c0 28.444444-5.688889 45.511111-11.377778 56.888889s-28.444444 17.066667-51.2 17.066666h-85.333333v56.888889h125.155556c17.066667 0 28.444444 5.688889 34.133333 11.377778 5.688889 5.688889 11.377778 17.066667 11.377778 28.444445 11.377778 22.755556 11.377778 34.133333 0 39.822222z" p-id="6316" fill="#1296db"></path></svg>',real_money_yc='<svg t="1579155265981" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6949" width="16" height="16"><path d="M136.96 67.413h181.76L512 452.693l193.28-385.28h181.76l-245.76 445.44h163.84v84.48h-211.2l-1.28 1.28v106.24h212.48v84.48H592.64v192H431.36v-192h-211.2v-84.48h211.2v-106.24l-1.28-1.28H220.16v-84.48h162.56z" fill="#F54330" p-id="6950"></path></svg>',real_info={view:"",showtime:777,danmu_person_count:"",gift_person_count:"",isShow:2,money_yc:0,money_bag:0,money_total:0},curVersion="2020.02.20.01",hexcase=0,b64pad="",chrsz=8;!function(e,t){"object"===("undefined"==typeof exports?"undefined":_typeof(exports))&&"object"===("undefined"==typeof module?"undefined":_typeof(module))?module.exports=t():"function"==typeof define&&define.amd?define("NoticeJs",[],t):"object"===("undefined"==typeof exports?"undefined":_typeof(exports))?exports.NoticeJs=t():e.NoticeJs=t()}("undefined"!=typeof self?self:void 0,function(){return function(e){function t(o){if(n[o])return n[o].exports;var i=n[o]={i:o,l:!1,exports:{}};return e[o].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="dist/",t(t.s=2)}([function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});t.noticeJsModalClassName="noticejs-modal",t.closeAnimation="noticejs-fadeOut",t.Defaults={title:"",text:"",type:"success",position:"topRight",timeout:30,progressBar:!0,closeWith:["button"],animation:null,modal:!1,scroll:{maxHeight:300,showOnHover:!0},rtl:!1,callbacks:{beforeShow:[],onShow:[],afterShow:[],onClose:[],afterClose:[],onClick:[],onHover:[],onTemplate:[]}}},function(e,t,n){function o(e,t){e.callbacks.hasOwnProperty(t)&&e.callbacks[t].forEach(function(t){"function"==typeof t&&t.apply(e)})}Object.defineProperty(t,"__esModule",{value:!0}),t.appendNoticeJs=t.addListener=t.CloseItem=t.AddModal=void 0,t.getCallback=o;var i=n(0),a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(i),r=a.Defaults,s=t.AddModal=function(){if(document.getElementsByClassName(a.noticeJsModalClassName).length<=0){var e=document.createElement("div");e.classList.add(a.noticeJsModalClassName),e.classList.add("noticejs-modal-open"),document.body.appendChild(e),setTimeout(function(){e.className=a.noticeJsModalClassName},200)}},l=t.CloseItem=function(e){o(r,"onClose"),null!==r.animation&&null!==r.animation.close&&(e.className+=" "+r.animation.close),setTimeout(function(){e.remove()},200),!0===r.modal&&document.querySelectorAll("[noticejs-modal='true']").length>=1&&(document.querySelector(".noticejs-modal").className+=" noticejs-modal-close",setTimeout(function(){document.querySelector(".noticejs-modal").remove()},500));var t="."+e.closest(".noticejs").className.replace("noticejs","").trim();setTimeout(function(){if(document.querySelectorAll(t+" .item").length<=0){var e=document.querySelector(t);null!=e&&e.remove()}},500)},c=t.addListener=function(e){r.closeWith.includes("button")&&e.querySelector(".close").addEventListener("click",function(){l(e)}),r.closeWith.includes("click")?(e.style.cursor="pointer",e.addEventListener("click",function(t){"close"!==t.target.className&&(o(r,"onClick"),l(e))})):e.addEventListener("click",function(e){"close"!==e.target.className&&o(r,"onClick")}),e.addEventListener("mouseover",function(){o(r,"onHover")})};t.appendNoticeJs=function(e,t,n){var i=".noticejs-"+r.position,a=document.createElement("div");return a.classList.add("item"),a.classList.add(r.type),!0===r.rtl&&a.classList.add("noticejs-rtl"),e&&""!==e&&a.appendChild(e),a.appendChild(t),n&&""!==n&&a.appendChild(n),["top","bottom"].includes(r.position)&&(document.querySelector(i).innerHTML=""),null!==r.animation&&null!==r.animation.open&&(a.className+=" "+r.animation.open),!0===r.modal&&(a.setAttribute("noticejs-modal","true"),s()),c(a,r.closeWith),o(r,"beforeShow"),o(r,"onShow"),document.querySelector(i).appendChild(a),o(r,"afterShow"),a}},function(e,t,n){function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n(3),s=(function(e){e&&e.__esModule}(r),n(0)),l=o(s),c=n(4),d=n(1),u=o(d),p=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return i(this,e),this.options=Object.assign(l.Defaults,t),this.component=new c.Components,this.on("beforeShow",this.options.callbacks.beforeShow),this.on("onShow",this.options.callbacks.onShow),this.on("afterShow",this.options.callbacks.afterShow),this.on("onClose",this.options.callbacks.onClose),this.on("afterClose",this.options.callbacks.afterClose),this.on("onClick",this.options.callbacks.onClick),this.on("onHover",this.options.callbacks.onHover),this}return a(e,[{key:"show",value:function(){var e=this.component.createContainer();null===document.querySelector(".noticejs-"+this.options.position)&&document.body.appendChild(e);var t=void 0,n=void 0,o=void 0;return t=this.component.createHeader(this.options.title,this.options.closeWith),n=this.component.createBody(this.options.text),!0===this.options.progressBar&&(o=this.component.createProgressBar()),u.appendNoticeJs(t,n,o)}},{key:"on",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};return"function"==typeof t&&this.options.callbacks.hasOwnProperty(e)&&this.options.callbacks[e].push(t),this}}]),e}();t.default=p,e.exports=t.default},function(e,t){},function(e,t,n){function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0}),t.Components=void 0;var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n(0),s=o(r),l=n(1),c=o(l),d=s.Defaults;t.Components=function(){function e(){i(this,e)}return a(e,[{key:"createContainer",value:function(){var e="noticejs-"+d.position,t=document.createElement("div");return t.classList.add("noticejs"),t.classList.add(e),t}},{key:"createHeader",value:function(){var e=void 0;if(d.title&&""!==d.title&&(e=document.createElement("div"),e.setAttribute("class","noticejs-heading"),e.textContent=d.title),d.closeWith.includes("button")){var t=document.createElement("div");t.setAttribute("class","close"),t.innerHTML="&times;",e?e.appendChild(t):e=t}return e}},{key:"createBody",value:function(){var e=document.createElement("div");e.setAttribute("class","noticejs-body");var t=document.createElement("div");return t.setAttribute("class","noticejs-content"),t.innerHTML=d.text,e.appendChild(t),null!==d.scroll&&""!==d.scroll.maxHeight&&(e.style.overflowY="auto",e.style.maxHeight=d.scroll.maxHeight+"px",!0===d.scroll.showOnHover&&(e.style.visibility="hidden")),e}},{key:"createProgressBar",value:function(){var e=document.createElement("div");e.setAttribute("class","noticejs-progressbar");var t=document.createElement("div");if(t.setAttribute("class","noticejs-bar"),e.appendChild(t),!0===d.progressBar&&"boolean"!=typeof d.timeout&&!1!==d.timeout)var n=function(){if(o<=0){clearInterval(i);var n=e.closest("div.item");if(null!==d.animation&&null!==d.animation.close){n.className=n.className.replace(new RegExp("(?:^|\\s)"+d.animation.open+"(?:\\s|$)")," "),n.className+=" "+d.animation.close;var a=parseInt(d.timeout)+500;setTimeout(function(){c.CloseItem(n)},a)}else c.CloseItem(n)}else o--,t.style.width=o+"%"},o=100,i=setInterval(n,d.timeout);return e}}]),e}()}])});