Dette scriptet burde ikke installeres direkte. Det er et bibliotek for andre script å inkludere med det nye metadirektivet // @require https://update.greasyfork.org/scripts/447936/1461941/b-live-random-send-test.js
// ==UserScript==
// @version 1.7.1.11
// ==/UserScript==
!function(){const e=URL.createObjectURL(new Blob(["(",function(){const e={};self.onmessage=(t=>{switch(t.data.command){case"interval:start":const a=setInterval(()=>postMessage({message:"interval:tick",id:t.data.id}),t.data.interval);e[t.data.id]=a;break;case"interval:clear":clearInterval(e[t.data.id]),postMessage({message:"interval:cleared",id:t.data.id}),delete e[t.data.id];break;case"timeout:start":const l=setTimeout(()=>postMessage({message:"timeout:tick",id:t.data.id}),t.data.timeout);e[t.data.id]=l;break;case"timeout:clear":clearTimeout(e[t.data.id]),postMessage({message:"timeout:cleared",id:t.data.id}),delete e[t.data.id]}})}.toString(),")()"],{type:"application/javascript"})),t=new Worker(e);URL.revokeObjectURL(e);const a={id:0,callbacks:{},setInterval:(e,l,n)=>{const d=++a.id;return a.callbacks[d]={fn:e,context:n},t.postMessage({command:"interval:start",interval:l,id:d}),d},setTimeout:(e,l,n)=>{const d=++a.id;return a.callbacks[d]={fn:e,context:n},t.postMessage({command:"timeout:start",timeout:l,id:d}),d},onMessage:e=>{switch(e.data.message){case"interval:tick":case"timeout:tick":const t=a.callbacks[e.data.id];t&&t.fn&&t.fn.apply(t.context);break;case"interval:cleared":case"timeout:cleared":delete a.callbacks[e.data.id]}},clearInterval:e=>t.postMessage({command:"interval:clear",id:e}),clearTimeout:e=>t.postMessage({command:"timeout:clear",id:e})};t.onmessage=a.onMessage.bind(a);let l,n,d,i,c,o,s,r,u,m,p,h,g,b,v,k,x,y,f,C,w,E,L,I,B,T,S,A,N,M,P,_,z,D,R,G,F,j,H,V,U,O,W,$,q,K,J,Q,X={version:4,like:!1,random:!0,usePublic:!1,data1:{available:!0,values:["弹幕①","弹幕②"]},data2:{available:!0,values:[]},data3:{available:!0,values:[]},data4:{available:!0,values:["弹幕⑦"]},data5:{available:!0,values:[]}},Y={},Z={},ee=[],te=[],ae=null,le=null,ne=200,de=0,ie=e=>{alert("")},ce=(e,t)=>null,oe=(e,t)=>{console.warn('===> No implementation "setGmValue" method.')},se=e=>{console.warn('===> No implementation "delGmValue" method.')};const re=window.location.pathname.replace(/^\/(\S+\/)*/g,""),ue=e=>{if(!e||""==e)return!0;return new RegExp("^[ ]+$").test(e)},me=(e,t)=>{let a=document.getElementById("chat-control-panel-vm").querySelector("textarea");if(!a)return void alert("找不到输入弹幕文本框,请尝试刷新页面");if(!ue(a.value))return void console.log("===> 有内容正在编辑,跳过该次发送任务");let l=document.getElementsByClassName("right-action-btn")[0];l?(a.value=e,a.dispatchEvent(new Event("input",{bubbles:!0,cancelable:!0})),l.click()):alert("找不到发送按钮,请尝试刷新页面")},pe=()=>{for(let e=0;e<ee.length;e++)a.clearInterval(ee[e]),ee[e]=null;ee=[]},he=()=>{if(l.checked){if(!le){let e=ue(Y.text)?Y.text:"打卡",t=new Date(new Date((new Date).setDate((new Date).getDate()+1)).toDateString()).getTime()-(()=>(new Date).getTime())();console.log("===> 设置凌晨打卡定时器【"+t+"】"),R.value=ue(Z.signInText)?e:Z.signInText,le=a.setTimeout(()=>{me(ue(R.value)?e:R.value),console.log("===> 设置下一次打卡"),a.clearTimeout(le),le=null,he()},t)}}else le&&(console.log("===> 关闭自动打卡功能"),a.clearTimeout(le),le=null)},ge=e=>{M.value=e.data1.values.length?e.data1.values.join("|"):[],P.value=e.data2.values.length?e.data2.values.join("|"):[],_.value=e.data3.values.length?e.data3.values.join("|"):[],z.value=e.data4.values.length?e.data4.values.join("|"):[],D.value=e.data5.values.length?e.data5.values.join("|"):[]},be=()=>{k.checked=!1,B.checked=X.random,S.checked=X.like,T.checked=X.usePublic,A.value=X.interval||600,C.checked=X.data1.available,w.checked=X.data2.available,E.checked=X.data3.available,L.checked=X.data4.available,I.checked=X.data5.available,l.checked=Z.autoSignIn,c.checked=Z.noSleep,n.checked=Z.hideLoginGuide,d.checked=Z.hideHaruna,i.checked=Z.hideShop,o.checked=Z.hideGift,s.checked=Z.hideRoomFeed,r.checked=Z.hideRoomInfo,u.checked=Z.hideNotice,m.checked=Z.hideFooter,p.checked=Z.lottery,g.checked=Z.hesitation,h.checked=Z.closeLottery,b.checked=Z.noPrivacy,v.checked=Z.hideWatermark,x.checked=Z.hideBusiness,y.checked=Z.hideRankList,f.checked=Z.showLiveArea,(()=>{Ke(),Re(),Pe(),Ae(),Ne(),Me(),Ge(),Fe(),je(),Ve(),Xe(),he(),Oe(),$e(),We(),Qe(),_e(),ze(),De(),Ue();let e=a.setTimeout(()=>{a.clearTimeout(e),_e(),ze(),De(),Ue()},1e3)})()},ve=()=>N.style.display="block",ke=()=>{be(),N.style.display="none"},xe=()=>{if(X.data1.values.length<=0&&X.data2.values.length<=0&&X.data3.values.length<=0&&X.data4.values.length<=0&&X.data5.values.length<=0)return te||[];let e=[];e=X.data1.available?e.concat(X.data1.values):e,e=X.data2.available?e.concat(X.data2.values):e,e=X.data3.available?e.concat(X.data3.values):e,e=X.data4.available?e.concat(X.data4.values):e,e=X.data5.available?e.concat(X.data5.values):e,te=e,B.checked?te=(e=>{for(let t=0;t<e.length;t++){const a=Math.floor(Math.random()*e.length),l=e[t];e[t]=e[a],e[a]=l}return e})(e):de=0},ye=(e,t,l)=>{V.textContent=e,V.style.display="block",V.style.color=l||"#128712";let n=a.setTimeout(()=>{a.clearTimeout(n),V.style.display="none",V.textContent="",t&&(N.style.display="none")},1500)},fe=()=>{if(!Y||ue(Y.default)||ue(Y.config))return void ye("保存失败",!1,"red");Y.config&&(Z.autoSignIn=l.checked,Z.signInText=R.value,Z.noSleep=c.checked,Z.hideLoginGuide=n.checked,Z.hideHaruna=d.checked,Z.hideShop=i.checked,Z.hideGift=o.checked,Z.hideRoomFeed=s.checked,Z.hideRoomInfo=r.checked,Z.hideNotice=u.checked,Z.hideFooter=m.checked,Z.lottery=p.checked,window.localStorage.setItem("lottery_checked",p.checked),Z.hesitation=g.checked,window.localStorage.setItem("hesitation_checked",g.checked),Z.hesitationExpiry=G.value,window.localStorage.setItem("hesitation_expiry",G.value),Z.closeLottery=h.checked,window.localStorage.setItem("close_lottery_checked",Z.closeLottery),Z.noPrivacy=b.checked,Z.hideWatermark=v.checked,Z.hideBusiness=x.checked,Z.hideRankList=y.checked,Z.showLiveArea=f.checked,oe(Y.config,Z));let e=ue(M.value)?[]:M.value.split("|"),t=ue(P.value)?[]:P.value.split("|"),a=ue(_.value)?[]:_.value.split("|"),N=ue(z.value)?[]:z.value.split("|"),F=ue(D.value)?[]:D.value.split("|");if(X.interval=A.value,X.random=B.checked,X.like=S.checked,X.usePublic=T.checked,X.data1.available=C.checked,X.data2.available=w.checked,X.data3.available=E.checked,X.data4.available=L.checked,X.data5.available=I.checked,T.checked||(X.data1.values=e,X.data2.values=t,X.data3.values=a,X.data4.values=N,X.data5.values=F),oe(re,X),k.checked){let l={data1:{},data2:{},data3:{},data4:{},data5:{}};l.data1.values=e,l.data2.values=t,l.data3.values=a,l.data4.values=N,l.data5.values=F,oe(Y.default,l)}T.checked&&(X.data1.values=e,X.data2.values=t,X.data3.values=a,X.data4.values=N,X.data5.values=F),xe(),ye("设置成功",!0)},Ce=()=>{Y.config&&Z?(Z.script="",Z.moduleVersion="0.0.0",Z.lastUpdate="清除脚本缓存",oe(Y.config,Z),ye("清除成功")):(console.warn("元数据丢失"),ye("操作失败",!1,"red"))},we=()=>te.length<1?(alert("请先设置弹幕"),!1):(B.checked&&(de=Math.floor(Math.random()*te.length)),me(te[de]),++de>=te.length&&(de=0),!0),Ee=()=>{let e=0;if(ae)a.clearInterval(ae),ae=null,A.removeAttribute("disabled"),O?(F.style.removeProperty("background"),F.style.removeProperty("--color"),O.textContent="开始"):(F.style.removeProperty("color"),F.title="开始定时发送任务");else{if(e=1e3*(A.value||600),!we())return;ae=a.setInterval(we,e),A.setAttribute("disabled","disabled"),O?(F.style.background="rgba(255,0,0,1)",F.style.setProperty("--color","rgba(255,0,0,0.8)"),O.textContent="停止"):(F.style.color="rgb(255 102 153)",F.title="停止定时发送任务")}},Le=(e,t,a,l,n,d,i,c,o,s)=>{let r=document.createElement("input");r.type="checkbox",r.id=e,r.checked=!1,l&&!s&&r.addEventListener("click",l);let u=document.createElement("label");u.setAttribute("for",e),u.classList.add("switch-check-label");let m=document.createElement("span");m.textContent=t,m.title=a,m.classList.add("danmu-random-switch-button-title"),s&&(r.disabled=!0,r.classList.add("disabled"),u.classList.add("disabled"),m.classList.add("disabled"));let p=document.createElement("div");return p.id=e+"Div",p.classList.add("switch-check"),p.classList.add("switch-check-group"),p.appendChild(r),p.appendChild(u),p.appendChild(m),ue(d)||(p.style.marginLeft=d),ue(i)||(p.style.width=i),c&&p.style.setProperty("display","none"),o&&p.appendChild(o),n.appendChild(p),r},Ie=()=>{const e=document.getElementsByClassName("emoticons-panel border-box")[0];let t=document.createElement("i");t.classList.add("el-icon-setting");let a=document.createElement("button");if(a.title="定时设置",a.classList.add("el-button"),a.classList.add("el-button--mini"),a.classList.add("is-circle"),a.style.background="none",a.style.fontSize="19px",a.style.border="0",a.addEventListener("click",ve),a.appendChild(t),e){let t=document.createElement("div");return Be(e,t),t.style.backgroundImage="none",t.style.alignSelf="flex-end",t.style.marginBottom="5px",t.style.position="absolute",t.style.right="33px",t.appendChild(a),e.style.alignSelf="flex-start",e.style.marginTop="1px",t}return a.style.margin="0 5px",a},Be=(e,t)=>{Array.prototype.forEach.call(e.attributes,(e,a)=>t.setAttribute(e.name,e.value))},Te=(e,t,a)=>{a?e.style.setProperty("display",t,"important"):e.style.setProperty("display",t)},Se=(e,t)=>{t?Te(e,"none",!0):e.style.removeProperty("display")},Ae=()=>{let e=document.getElementById("switch-login-guide-vm");e&&Se(e,n.checked)},Ne=()=>{let e=document.getElementById("my-dear-haruna-vm");e&&Se(e,d.checked)},Me=()=>{let e=document.getElementById("shop-popover-vm");e&&Se(e,i.checked)},Pe=()=>{let e=document.getElementsByClassName("gift-control-section")[0];e&&Se(e,o.checked),(e=document.getElementById("web-player__bottom-bar__container"))&&Se(e,o.checked),e=document.getElementsByTagName("video");for(let t=0;t<e.length;t++){if(!e[t])return;o.checked?e[t].style.setProperty("height","100%"):(document.body.classList.contains("player-full-win")||document.body.classList.contains("fullscreen-fix"))&&e[t].style.setProperty("height","calc(100% - 114px)")}},_e=()=>{let e=document.getElementsByClassName("room-feed")[0];e&&Se(e,s.checked),(e=document.getElementsByClassName("flip-view p-relative")[0])&&Se(e,s.checked)},ze=()=>{let e=document.getElementsByClassName("room-info-ctnr")[0];e&&Se(e,r.checked)},De=()=>{let e=document.getElementsByClassName("right-container")[0];e&&(e.style.setProperty("min-height","auto"),Se(e,u.checked))},Re=()=>{let e=document.getElementById("link-footer-vm");e&&Se(e,m.checked)},Ge=()=>{if(b.checked){let e=document.createElement("style");e.id="hidePrivacyDialog",e.setAttribute("type","text/css"),e.innerHTML=".privacy-dialog{display:none !important;}",document.head.appendChild(e)}else{let e=document.getElementById("hidePrivacyDialog");e&&e.remove()}},Fe=()=>{let e=document.getElementsByClassName("web-player-icon-roomStatus")[0];e&&Se(e,v.checked)},je=()=>{let e=document.getElementById("businessContainerElement");e&&Se(e,x.checked)},He=()=>{let e=document.getElementById("playback-rate-title");e&&(Se(e,!0),e.parentElement.style.removeProperty("padding-bottom")),(e=document.getElementById("playback-rate-username"))&&e.style.removeProperty("display")},Ve=()=>{let e=document.getElementsByClassName("lower-row")[0];if(!e)return;let t=e.getElementsByClassName("right-ctnr")[0];if(t){Se(t,y.checked);let e=a.setTimeout(()=>{a.clearTimeout(e),e=null,He()},100)}},Ue=()=>{let e=document.getElementsByClassName("live-area")[0];e&&(((e,t)=>{t?Te(e,"block",!0):e.style.removeProperty("display")})(e,f.checked),He())},Oe=()=>{window.localStorage.setItem("lottery_checked",p.checked);let e=document.getElementById("hesitationCheckboxDiv");e&&Se(e,!p.checked)},We=()=>{window.localStorage.setItem("close_lottery_checked",h.checked)},$e=()=>{window.localStorage.setItem("hesitation_checked",g.checked),window.localStorage.setItem("hesitation_expiry",G.value)},qe=()=>{},Ke=()=>{let e=null;(e=T.checked?ce(Y.default,null):X)&&ge(e)},Je=()=>{let e=document.getElementsByClassName("like-btn")[0];e&&e.click()},Qe=()=>{if(S.checked){if(J)return;Je(),J=a.setInterval(()=>{let e=Math.floor(15e3*Math.random());1e3>e?Je():Q=a.setTimeout(()=>{a.clearTimeout(Q),Q=null,Je()},e)},15e3)}else J&&(a.clearInterval(J),J=null),Q&&(a.clearTimeout(Q),Q=null)},Xe=()=>{c.checked?W||(console.log("===> 开启防休眠功能"),W=a.setInterval(()=>{$=a.setTimeout(()=>{a.clearTimeout($),document.body.dispatchEvent(new MouseEvent("mousemove",{bubbles:!0}))},3e3*Math.random())},17e3)):(console.log("===> 关闭防休眠功能"),W&&(a.clearInterval(W),W=null),$&&(a.clearTimeout($),$=null))},Ye=e=>{let t=document.getElementsByClassName("close-btn bg-contain")[0];t&&(ue(e)?t.click():closeLotteryTimer=a.setTimeout(()=>{a.clearTimeout(closeLotteryTimer),t.click()},1e3*e))},Ze=e=>{if(e)if("false"!==window.localStorage.getItem("lottery_checked"))if("true"===window.localStorage.getItem("hesitation_checked")){let t=window.localStorage.getItem("hesitation_expiry");t=ue(t)||0>=t?1e5:1e3*t,t=Math.ceil(Math.random()*t);let l=a.setTimeout(()=>{a.clearTimeout(l),console.log(`===> 【${(new Date).toLocaleString()}】犹豫期过后自动参加抽奖`),e.click(),"true"===window.localStorage.getItem("close_lottery_checked")&&(console.log("===> 参加成功,延迟关闭弹窗"),Ye(3))},t)}else console.log("===> 立刻自动参加抽奖"),e.click(),"true"===window.localStorage.getItem("close_lottery_checked")&&(console.log("===> 参加成功,延迟关闭弹窗"),Ye(3));else"true"===window.localStorage.getItem("close_lottery_checked")&&(console.log("===> 不参与天选时刻抽奖,关闭弹窗"),Ye());else console.warn("===> 没有抽奖按钮DOM")},et=e=>{!e||0>=e.length||Array.prototype.forEach.call(e,e=>{let t=e.firstChild;if(!t)return;let a=t.children[1];if(!a)return;let l=a.children[1];if(!l)return;let n=l.children[1];if(!n)return;let d=n.children[0];if(!d)return;t.title=d.textContent;let i=a.children[0];if(i){let e=i.lastChild;e&&e.style.display&&"none"==e.style.display&&e.remove()}})},tt=()=>{let e={};return Y.config&&(e=ce(Y.config,{}),ue(e.lottery)&&(e.lottery=!1),ue(e.closeLottery)&&(e.closeLottery=!1),ue(e.hesitation)&&(e.hesitation=!1)),e},at=(e,t)=>{let a=document.getElementById("danmu-setting-panel");if(e&&!a){if((()=>{let e=document.createElement("div");e.textContent="弹幕设置",e.classList.add("danmu-random-setting-title");let t=document.createElement("div");t.textContent="1.7.1.1",t.classList.add("danmu-random-setting-title-sub"),e.appendChild(t);let a=document.createElement("div");a.classList.add("danmu-random-setting-tips"),a.innerHTML='任一分组内输入弹幕即可,多条用<span style="color:#dc6b07;margin:0 2px 0 4px;font-weight:700;font-style:normal;">竖线</span>分隔',(U=document.createElement("div")).classList.add("module-update-info"),U.innerHTML=`<span class="update-info-text">消息提示:</span><span class="update-info-text" style="color:#0f6ba6;">${Y.msg||"适配发送框新UI,阿B这是在搞事,啥折腾。。"}</span>`;let F=document.createElement("div");F.textContent="分组 1 :",F.classList.add("danmu-group-title"),(C=document.createElement("input")).type="checkbox",C.id="group1Checkbox",C.checked=!0;let O=document.createElement("label");O.setAttribute("for","group1Checkbox"),O.classList.add("switch-check-label");let W=document.createElement("div");W.classList.add("switch-check"),W.appendChild(C),W.appendChild(O),(M=document.createElement("textarea")).classList.add("danmu-group-textarea"),M.setAttribute("placeholder","请输入弹幕,多条弹幕请用“|”分隔");let $=document.createElement("div");$.textContent="分组 2 :",$.classList.add("danmu-group-title"),(w=document.createElement("input")).type="checkbox",w.id="group2Checkbox",w.checked=!0;let q=document.createElement("label");q.setAttribute("for","group2Checkbox"),q.classList.add("switch-check-label");let K=document.createElement("div");K.classList.add("switch-check"),K.appendChild(w),K.appendChild(q),(P=document.createElement("textarea")).classList.add("danmu-group-textarea"),P.setAttribute("placeholder","请输入弹幕,多条弹幕请用“|”分隔");let J=document.createElement("div");J.textContent="分组 3 :",J.classList.add("danmu-group-title"),(E=document.createElement("input")).type="checkbox",E.id="group3Checkbox",E.checked=!0;let Q=document.createElement("label");Q.setAttribute("for","group3Checkbox"),Q.classList.add("switch-check-label");let X=document.createElement("div");X.classList.add("switch-check"),X.appendChild(E),X.appendChild(Q),(_=document.createElement("textarea")).classList.add("danmu-group-textarea"),_.setAttribute("placeholder","请输入弹幕,多条弹幕请用“|”分隔");let Z=document.createElement("div");Z.textContent="分组 4 :",Z.classList.add("danmu-group-title"),(L=document.createElement("input")).type="checkbox",L.id="group4Checkbox",L.checked=!0;let ee=document.createElement("label");ee.setAttribute("for","group4Checkbox"),ee.classList.add("switch-check-label");let te=document.createElement("div");te.classList.add("switch-check"),te.appendChild(L),te.appendChild(ee),(z=document.createElement("textarea")).classList.add("danmu-group-textarea"),z.setAttribute("placeholder","请输入弹幕,多条弹幕请用“|”分隔");let ae=document.createElement("div");ae.textContent="分组 5 :",ae.classList.add("danmu-group-title"),(I=document.createElement("input")).type="checkbox",I.id="group5Checkbox",I.checked=!0;let le=document.createElement("label");le.setAttribute("for","group5Checkbox"),le.classList.add("switch-check-label");let ne=document.createElement("div");ne.classList.add("switch-check"),ne.appendChild(I),ne.appendChild(le),(D=document.createElement("textarea")).classList.add("danmu-group-textarea"),D.setAttribute("placeholder","请输入弹幕,多条弹幕请用“|”分隔"),(j=document.createElement("span")).textContent="设置弹幕每",j.classList.add("danmu-text-span"),j.style.marginLeft="4px",(A=document.createElement("input")).value=600,A.classList.add("danmu-second-input"),A.setAttribute("oninput","this.value = this.value.replace(/[^0-9]/g, '')"),(H=document.createElement("span")).textContent="秒发送一次",H.classList.add("danmu-text-span"),H.style.marginRight="4px";let de=document.createElement("div");de.appendChild(j),de.appendChild(A),de.appendChild(H);let ie=document.createElement("div");ie.appendChild(F),ie.appendChild(W),ie.appendChild(M),ie.appendChild($),ie.appendChild(K),ie.appendChild(P),ie.appendChild(J),ie.appendChild(X),ie.appendChild(_),ie.appendChild(Z),ie.appendChild(te),ie.appendChild(z),ie.appendChild(ae),ie.appendChild(ne),ie.appendChild(D),ie.appendChild(de),B=Le("rdCheckbox","随机从上面的弹幕中选出一条发送","将合并所有分组数据,从中随机选出一条发送",null,ie),T=Le("usePublicCheckbox","使用共用弹幕源","使用设置为共用弹幕作为弹幕源",Ke,ie),S=Le("autoLikeCheckbox","自动点赞该直播间","每15秒内随机一个时间点点赞一次直播间(点赞1000次大概需要4小时)",Qe,ie,null,null,null,null);let ce=document.createElement("div");ce.textContent="以上设置对应各个直播间独立保存,无需刷新",ce.title="请点击设置面板底下的“✓”进行保存",ce.classList.add("global-setting-tip"),ce.classList.add("switch-check-group"),ie.appendChild(ce);let oe=document.createElement("div");oe.style.margin="20px 0 10px",(ce=document.createElement("div")).textContent="以下设置,需刷新其它直播间才能适用",ce.title="请点击设置面板底下的“✓”进行保存",ce.classList.add("global-setting-tip"),ce.classList.add("switch-check-group"),oe.appendChild(ce),(R=document.createElement("input")).id="signInputText",R.style.border="0",R.style.width="90px",R.setAttribute("placeholder","输入打卡的文字"),(G=document.createElement("input")).style.border="0",G.style.width="55px",G.setAttribute("placeholder","单位:秒"),G.setAttribute("oninput","this.value = this.value.replace(/[^0-9]/g, '')"),k=Le("setPublicCheckbox","设为共用弹幕源","把这个直播间的弹幕共享给其它直播间使用,先后设置时,后面的会覆盖前面的设置",qe,oe),l=Le("signInCheckbox","打卡弹幕(需登录):","每日零点发送一条打卡弹幕",he,oe,null,null,!1,R),p=Le("lotteryCheckbox","自动参与天选时刻抽奖(需登录)","自动点击参与按钮,请确保已经登录了阿B账号",Oe,oe),g=Le("hesitationCheckbox","随机犹豫期:","(尝试应对人机校验,不一定有效,随机的范围:(0, 填的数字])不立刻参与天选时刻,这期间可以手动处理,免得自动参加后后悔(时间单位:秒)",$e,oe,"23px","90%",!0,G),h=Le("closeLotteryCheckbox","关闭天选时刻","关闭天选时刻弹窗",We,oe),o=Le("hideGiftControlCheckbox","隐藏礼物栏","隐藏播放器底部的礼物栏",Pe,oe),c=Le("noSleepCheckbox","防止直播间休眠","防止直播间页面一段时间没操作之后进入休眠",Xe,oe,null,null,!1),n=Le("hideLoginGuideCheckbox","隐藏播放器底部登录提示","隐藏未登录时播放器底部显示的登录提示",Ae,oe),d=Le("hideHarunaCheckbox","隐藏看板娘立绘","隐藏直播间Haruna立绘",Ne,oe),i=Le("hideShopCheckbox","隐藏购物提示","隐藏播放器左上角的商店购物提示",Me,oe),s=Le("hideRoomFeedCheckbox","隐藏主播动态","隐藏播放器底下主播的动态栏",_e,oe),r=Le("hideRoomInfoCheckbox","隐藏简介、荣誉,或直播间推荐列表","隐藏播放器底下直播间推荐列表,不登录账号显示为主播的荣耀和简介",ze,oe),u=Le("hideNoticeCheckbox","隐藏主播公告","隐藏弹幕列表底下主播的公告",De,oe),m=Le("hideFooterCheckbox","隐藏直播间页脚","隐藏直播间底部的网页页脚",Re,oe),b=Le("hidePrivacyCheckbox","隐藏隐私提示对话框","隐藏隐私提示登录的对话框,被打码的昵称不保证变回正常",Ge,oe),v=Le("hideRoomStatusCheckbox","隐藏直播水印","隐藏播放器左上角的直播水印",Fe,oe),x=Le("hideBusinessCheckbox","隐藏商业性互动","隐藏全站广播、PK、连MIC、连视频等",je,oe),y=Le("hideRankListCheckbox","隐藏滚动排行榜","隐藏顶部的人气榜、航海榜、礼物星球等",Ve,oe),f=Le("showLiveArea","显示直播分区","显示直播间所属的直播分区",Ue,oe),(V=document.createElement("span")).classList.add("danmu-random-setting-success-text");let se=document.createElement("div");se.classList.add("danmu-random-setting-success-tips"),se.appendChild(V);let re=document.createElement("button");re.style.setProperty("display","none"),re.textContent="清除缓存",re.classList.add("clean-cache-btn"),re.addEventListener("click",Ce);let ue=document.createElement("i");ue.setAttribute("title","保存"),ue.style.padding="5px",ue.classList.add("el-button"),ue.classList.add("el-icon-check"),ue.classList.add("is-circle"),ue.addEventListener("click",fe);let me=document.createElement("i");me.setAttribute("title","关闭"),me.style.padding="5px",me.classList.add("el-button"),me.classList.add("el-icon-close"),me.classList.add("is-circle"),me.addEventListener("click",ke);let pe=document.createElement("div");pe.classList.add("danmu-random-set-button-container"),pe.appendChild(re),pe.appendChild(ue),pe.appendChild(me);let ge=document.createElement("div");ge.classList.add("danmu-random-setting-bottom"),ge.appendChild(se),ge.appendChild(pe);let be=document.createElement("div");be.id="otherContainer";let ve=document.createElement("div");ve.style.height="calc(98% - 30px - 25px)",ve.appendChild(ie),ve.appendChild(oe),ve.appendChild(be),ve.appendChild(ge),(N=document.createElement("div")).id="danmu-setting-panel",N.classList.add("danmu-random-setting-panel"),N.appendChild(e),N.appendChild(U),N.appendChild(a),N.appendChild(ve),document.getElementById("aside-area-vm").appendChild(N)})(),t){let t=document.getElementsByClassName("right-actions border-box")[0];t&&(t.style.alignSelf="flex-start",t.style.marginTop="0px",e.appendChild((()=>{let e=document.createElement("i");e.classList.add("el-icon-s-promotion"),(F=document.createElement("button")).title="开始定时发送任务",F.classList.add("el-button"),F.classList.add("el-button--mini"),F.classList.add("is-circle"),F.style.background="none",F.style.fontSize="20px",F.style.border="0",F.addEventListener("click",Ee),F.appendChild(e);let t=document.createElement("div");return t.style.position="absolute",t.style.right="5px",t.style.alignSelf="flex-end",t.style.marginBottom="-2px",t.appendChild(F),t})()),e.insertBefore(Ie(),t))}else{let t=document.getElementsByClassName("bl-button--primary bl-button--small")[0];if(!t)return console.warn("===> 发送按钮丢失"),!1;{(e=>{if((O=document.createElement("span")).textContent="开始",O.title="开始定时发送任务",O.classList.add("txt"),(F=document.createElement("button")).title="开始定时发送任务",F.addEventListener("click",Ee),F.appendChild(O),e){Be(e,F);const t=e.querySelector("span");t&&Be(t,O)}else F.classList.add("danmu-btn"),F.style.setProperty("--color","rgba(217,157,27,0.8)")})(t);let a=document.createElement("div");a.style.position="absolute",a.appendChild(F),a.appendChild(Ie()),e.appendChild(a)}}(()=>{let e=ce(re,null),t=re;if(e){if(e.usePublic&&Y.default){let t=ce(Y.default,null);t&&(e.data1.values=t.data1?t.data1.values:e.data1.values,e.data2.values=t.data2?t.data2.values:e.data2.values,e.data3.values=t.data3?t.data3.values:e.data3.values,e.data4.values=t.data4?t.data4.values:e.data4.values,e.data5.values=t.data5?t.data5.values:e.data5.values)}X.version===e.version?X={...X,...e}:2===e.version?(X.data1=e.data1,X.data2=e.data2,X.data3=e.data3,X.data4=e.data4,X.data5=e.data5,oe(t,X)):(X.data1.values=e.data1?e.data1.values:X.data1.values,X.data2.values=e.data2?e.data2.values:X.data2.values,X.data3.values=e.data3?e.data3.values:X.data3.values,X.data4.values=e.data4?e.data4.values:X.data4.values,X.data5.values=e.data5?e.data5.values:X.data5.values,oe(t,X))}Z=tt(),R.value=ue(Z.signInText)?"":Z.signInText,G.value=ue(Z.hesitationExpiry)?"100":Z.hesitationExpiry,ge(X),be(),xe()})()}return!0},lt=(e,t)=>{ee[ee.length]=a.setInterval(()=>{at(e,t)?pe():0>=--ne&&(pe(),console.log("===> 创建面板失败,停止初始化"))},1500)},nt=(e,t)=>{let l=document.getElementsByClassName(e)[0];if(l)lt(l,t);else{let n=0;K=a.setInterval(()=>{(l=document.getElementsByClassName(e)[0])?(a.clearInterval(K),lt(l,t)):n++>=10&&a.clearInterval(K)},1e3)}};(()=>{let e=document.createElement("link");e.rel="stylesheet",e.href="https://unpkg.zhimg.com/element-ui/lib/theme-chalk/index.css",document.head.appendChild(e);let t=document.createElement("style");t.setAttribute("type","text/css"),t.innerHTML='.danmu-group-title{font-size:14px;padding-left:2px;color:rgb(18,56,141);display:inline;margin-right:60%;vertical-align:middle;}.danmu-group-textarea{width:98%;min-height:100px;height:16%;margin:1px 0px 4px;border:0px;resize:none;}.el-button{display:inline-block;line-height:1;white-space:nowrap;cursor:pointer;background:#FFF;border:1px solid #DCDFE6;color:#606266;-webkit-appearance:none;text-align:center;-webkit-box-sizing:border-box;box-sizing:border-box;outline:0;margin:0;-webkit-transition:.1s;transition:.1s;font-weight:500;padding:12px 20px;font-size:14px;border-radius:4px}.el-button.is-circle{border-radius:50%;padding:12px}.el-button--mini.is-circle{padding:3px;}.el-button:focus,.el-button:hover{color:#409EFF;border-color:#c6e2ff;background-color:#ecf5ff}.el-icon-close.is-circle{padding:5px;color:#ff0000;border:1px solid #ff0000;margin-left:20px;}.el-icon-check.is-circle{padding:5px;color:#0000ff;border:1px solid #0000ff;margin-left:20px;}input[type="checkbox"]{display:none;}.switch-check{display:inline-block;margin:0 5px;vertical-align:middle;}.switch-check-label{display:inline-block;vertical-align:middle;border:1px solid #bdc3c7;border-radius:60px;width:40px;height:18px;position:relative;transition:all .3s;cursor:pointer;}.switch-check-label:before{width:14px;height:14px;content:"";display:inline-block;background-color:#bdc3c7;border-radius:100%;position:absolute;top:2px;left:4px;transition:all .3s;}.switch-check :checked ~ label{background-color:#26b22b;border-color:#26b22b;}.switch-check :checked ~ label:before{left:22px;background-color:#fff;}.switch-check-group{margin-top:5px;width:95%;}.danmu-random-setting-panel{background-color:#e7f1fb;border-radius:10px;width:100%;height:100%;overflow-y:auto;position:absolute;left:0px;top:0px;z-index:999;display:none;}.danmu-random-setting-panel::-webkit-scrollbar{width:4px;height:4px;}.danmu-random-setting-panel::-webkit-scrollbar-thumb{border-radius:5px;-webkit-box-shadow:inset 0 0 5px rgba(0,0,0,0.2);background:rgba(0,0,0,0.2);}.danmu-random-setting-panel::-webkit-scrollbar-track{-webkit-box-shadow:inset 0 0 5px rgba(0,0,0,0.2);border-radius:0;background:rgba(0,0,0,0.1);}.danmu-random-setting-title{text-align:center;font-size:16px;font-weight:700;color:#1c5adc;line-height:30px;}.danmu-random-setting-title-sub{display:inline-block;color:#ee8b8b;height:24px;vertical-align:sub;-webkit-transform:scale(0.7);}.danmu-random-setting-tips{color:#0b81cc;text-align:center;font-style:italic;}.module-update-info{color:#0b81cc;text-indent:2em;font-size:13px;font-weight:700;margin:8px 0;padding:2px 0;background-color:#ffffff;}.update-info-text{color:#f00;vertical-align:-webkit-baseline-middle;}.danmu-random-setting-bottom{width:100%;line-height:35px;}.danmu-random-switch-button-title{font-size:14px;vertical-align:middle;margin-left:5px;color:#095ca2;cursor:help;}.danmu-random-setting-success-tips{text-align:center;display:inline-block;vertical-align:middle;width:40%;}.danmu-random-setting-success-text{font-size:16px;color:#128712;display:none;}.danmu-random-set-button-container{display:inline-block;vertical-align:middle;}.global-setting-tip{padding-left:10px;color:red;font-size:14px;font-weight:700;cursor:help;}.disabled{color:#ababab;cursor:not-allowed;}.clean-cache-btn{min-width:70px;font-size:14px;border-radius:4px;color:#fff;background:#d99d1b;border:0px;cursor:pointer;vertical-align:middle;line-height:30px;}.clean-cache-btn:hover{background:rgba(217,157,27,0.8);color:#000}.danmu-btn{min-width:65px;height:24px;font-size:12px;border-radius:4px;color:rgb(255,255,255);background:rgb(217,157,27);border:0px;cursor:pointer;line-height:1;display:inline-flex;justify-content:center;align-items:center;}.danmu-btn:hover{background:var(--color)!important;}.danmu-text-span{color:#095ca2;font-size:20px;vertical-align:middle;font-weight:700}.danmu-second-input{width:70px;height:20px;margin:0px 3px;border:0px;border-radius:3px;font-size:18px}.not-display{display:none !important;}',document.head.appendChild(t)})(),window.runStart=(()=>{(()=>{let e=document.getElementsByClassName("particitation-btn")[0];e?Ze(e):q=a.setTimeout(()=>{a.clearTimeout(q),(e=document.getElementsByClassName("particitation-btn")[0])&&Ze(e)},2e3)})(),(()=>{let e=a.setTimeout(()=>{a.clearTimeout(e);let t={childList:!0};["all__card-list-ctnr","all__special-area-recommend-list-ctnr"].forEach(e=>{let a=document.getElementsByClassName(e)[0];a&&Array.prototype.forEach.call(a.children,e=>{/^index_/i.test(e.className)&&(et(e.children),new MutationObserver(e=>{!e||0>=e.length||Array.prototype.forEach.call(e,e=>et(e.addedNodes))}).observe(e,t))})})},500)})(),(()=>nt("bottom-actions p-relative",!1))(),(()=>nt("chat-input-ctnr-new p-relative default-height",!0))()}),window.arrayInfo=(()=>console.info(te)),window.setGmNotice=(e=>e),window.setGmGetValue=(e=>ce=e),window.setGmSetValue=(e=>oe=e),window.setGmDelValue=(e=>e),window.setBaseInfo=(e=>Y=e),window.checkVersion=(()=>{if((Z=tt())&&Z.moduleVersion&&U&&0<((e,t)=>{if(ue(e))return-1;if(ue(t))return 1;const a=e.split(".").map(e=>1*e),l=t.split(".").map(e=>1*e),n=Math.max(a.length,l.length);for(let e=0;e<n;e++){if((a[e]||0)>(l[e]||0))return 1;if((a[e]||0)<(l[e]||0))return-1}return 0})(Z.moduleVersion,"1.7.1.1")){U.innerHTML='<span class="update-info-text">有新版本,刷新网页进行更新</span>';let e=document.getElementById("otherContainer");e&&(e.style.fontSize="18px",e.style.textAlign="center",e.appendChild(U.cloneNode(!0)))}})}();