b-live-random-send-test

定时从设置的字幕中随机取出一条在B站直播间发送,需先登录B站账号

Från och med 2024-09-06. Se den senaste versionen.

Detta skript bör inte installeras direkt. Det är ett bibliotek för andra skript att inkludera med meta-direktivet // @require https://update.greasyfork.org/scripts/447936/1442629/b-live-random-send-test.js

// ==UserScript==
// @version     1.7.0
// ==/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,y,x,f,C,E,w,L,B,I,T,A,S,N,M,P,_,D,z,F,R,G,K,j,H,V,U,O,W,q,$,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("请更新油猴脚本"),window.location.href=re},ce=(e,t)=>null,oe=(e,t)=>{console.warn('===> No implementation "setGmValue" method.')},se=e=>{console.warn('===> No implementation "delGmValue" method.')};const re="https://greasyfork.org/scripts/446725-b%E7%AB%99%E7%9B%B4%E6%92%AD%E9%97%B4%E5%AE%9A%E6%97%B6%E5%8F%91%E9%9A%8F%E6%9C%BA%E5%BC%B9%E5%B9%95/code/B%E7%AB%99%E7%9B%B4%E6%92%AD%E9%97%B4%E5%AE%9A%E6%97%B6%E5%8F%91%E9%9A%8F%E6%9C%BA%E5%BC%B9%E5%B9%95.user.js",ue=window.location.pathname.replace(/^\/(\S+\/)*/g,""),me=e=>{if(!e||""==e)return!0;return new RegExp("^[ ]+$").test(e)},pe=(e,t)=>{if(me(e))return-1;if(me(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},he=(e,t)=>{let a=document.getElementById("chat-control-panel-vm").querySelector("textarea");if(!a)return void alert("找不到输入弹幕文本框,请尝试刷新页面");if(!me(a.value))return void console.log("===> 有内容正在编辑,跳过该次发送任务");let l=document.getElementsByClassName("bl-button bl-button--primary")[0];l?(a.value=e,a.dispatchEvent(new Event("input",{bubbles:!0,cancelable:!0})),l.click()):alert("找不到发送按钮,请尝试刷新页面")},ge=()=>{for(let e=0;e<ee.length;e++)a.clearInterval(ee[e]),ee[e]=null;ee=[]},be=()=>{if(l.checked){if(!le){let e=me(Y.signText)?Y.signText:"打卡",t=new Date(new Date((new Date).setDate((new Date).getDate()+1)).toDateString()).getTime()-(()=>(new Date).getTime())();console.log("===> 设置凌晨打卡定时器【"+t+"】"),F.value=me(Z.signInText)?e:Z.signInText,le=a.setTimeout(()=>{he(me(F.value)?e:F.value),console.log("===> 设置下一次打卡"),a.clearTimeout(le),le=null,be()},t)}}else le&&(console.log("===> 关闭自动打卡功能"),a.clearTimeout(le),le=null)},ve=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("|"):[],D.value=e.data4.values.length?e.data4.values.join("|"):[],z.value=e.data5.values.length?e.data5.values.join("|"):[]},ke=()=>{k.checked=!1,I.checked=X.random,A.checked=X.like,T.checked=X.usePublic,C.checked=X.data1.available,E.checked=X.data2.available,w.checked=X.data3.available,L.checked=X.data4.available,B.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,y.checked=Z.hideBusiness,x.checked=Z.hideRankList,f.checked=Z.showLiveArea,(()=>{Qe(),Ge(),De(),Me(),Pe(),_e(),Ke(),je(),He(),Ue(),Ze(),be(),We(),$e(),qe(),Ye(),ze(),Fe(),Re(),Oe();let e=a.setTimeout(()=>{a.clearTimeout(e),ze(),Fe(),Re(),Oe()},1e3)})()},ye=()=>N.style.display="block",xe=()=>{ke(),N.style.display="none"},fe=()=>{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,I.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},Ce=(e,t,l)=>{H.textContent=e,H.style.display="block",H.style.color=l||"#128712";let n=a.setTimeout(()=>{a.clearTimeout(n),H.style.display="none",H.textContent="",t&&(N.style.display="none")},1500)},Ee=()=>{if(!Y||me(Y.defaultKey)||me(Y.configKey))return void Ce("保存失败",!1,"red");Y.configKey&&(Z.autoSignIn=l.checked,Z.signInText=F.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=R.value,window.localStorage.setItem("hesitation_expiry",R.value),Z.closeLottery=h.checked,window.localStorage.setItem("close_lottery_checked",Z.closeLottery),Z.noPrivacy=b.checked,Z.hideWatermark=v.checked,Z.hideBusiness=y.checked,Z.hideRankList=x.checked,Z.showLiveArea=f.checked,oe(Y.configKey,Z));let e=me(M.value)?[]:M.value.split("|"),t=me(P.value)?[]:P.value.split("|"),a=me(_.value)?[]:_.value.split("|"),S=me(D.value)?[]:D.value.split("|"),N=me(z.value)?[]:z.value.split("|");if(X.random=I.checked,X.like=A.checked,X.usePublic=T.checked,X.data1.available=C.checked,X.data2.available=E.checked,X.data3.available=w.checked,X.data4.available=L.checked,X.data5.available=B.checked,T.checked||(X.data1.values=e,X.data2.values=t,X.data3.values=a,X.data4.values=S,X.data5.values=N),oe(ue,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=S,l.data5.values=N,oe(Y.defaultKey,l)}T.checked&&(X.data1.values=e,X.data2.values=t,X.data3.values=a,X.data4.values=S,X.data5.values=N),fe(),Ce("设置成功",!0)},we=()=>{Y.configKey&&Z?(Z.script="",Z.lastUpdate="清除缓存",oe(Y.configKey,Z),Ce("清除成功")):(console.warn("元数据丢失"),Ce("操作失败",!1,"red"))},Le=()=>te.length<1?(alert("请先设置弹幕"),!1):(I.checked&&(de=Math.floor(Math.random()*te.length)),he(te[de]),++de>=te.length&&(de=0),!0),Be=()=>{let e=0;if(ae)a.clearInterval(ae),ae=null,G.style.removeProperty("background"),G.style.removeProperty("--color"),S.removeAttribute("disabled"),U.textContent="开始";else{if(e=1e3*(me(S.value)?600:S.value),!Le())return;ae=a.setInterval(Le,e),G.style.background="rgba(255,0,0,1)",G.style.setProperty("--color","rgba(255,0,0,0.8)"),S.setAttribute("disabled","disabled"),U.textContent="停止"}},Ie=(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),me(d)||(p.style.marginLeft=d),me(i)||(p.style.width=i),c&&p.style.setProperty("display","none"),o&&p.appendChild(o),n.appendChild(p),r},Te=()=>{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.addEventListener("click",ye),a.appendChild(t),e){let t=document.createElement("div");return Ae(e,t),t.title="定时设置",t.style.backgroundImage="none",t.style.position="absolute",t.style.right="60px",t.style.bottom="2px",t.appendChild(a),e.style.position="absolute",e.style.right="60px",e.style.top="4px",t}return a.style.margin="0 5px",a},Ae=(e,t)=>{Array.prototype.forEach.call(e.attributes,(e,a)=>t.setAttribute(e.name,e.value))},Se=(e,t,a)=>{a?e.style.setProperty("display",t,"important"):e.style.setProperty("display",t)},Ne=(e,t)=>{t?Se(e,"none",!0):e.style.removeProperty("display")},Me=()=>{let e=document.getElementById("switch-login-guide-vm");e&&Ne(e,n.checked)},Pe=()=>{let e=document.getElementById("my-dear-haruna-vm");e&&Ne(e,d.checked)},_e=()=>{let e=document.getElementById("shop-popover-vm");e&&Ne(e,i.checked)},De=()=>{let e=document.getElementsByClassName("gift-control-section")[0];e&&Ne(e,o.checked),(e=document.getElementById("web-player__bottom-bar__container"))&&Ne(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)")}},ze=()=>{let e=document.getElementsByClassName("room-feed")[0];e&&Ne(e,s.checked),(e=document.getElementsByClassName("flip-view p-relative")[0])&&Ne(e,s.checked)},Fe=()=>{let e=document.getElementsByClassName("room-info-ctnr")[0];e&&Ne(e,r.checked)},Re=()=>{let e=document.getElementsByClassName("right-container")[0];e&&(e.style.setProperty("min-height","auto"),Ne(e,u.checked))},Ge=()=>{let e=document.getElementById("link-footer-vm");e&&Ne(e,m.checked)},Ke=()=>{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()}},je=()=>{let e=document.getElementsByClassName("web-player-icon-roomStatus")[0];e&&Ne(e,v.checked)},He=()=>{let e=document.getElementById("businessContainerElement");e&&Ne(e,y.checked)},Ve=()=>{let e=document.getElementById("playback-rate-title");e&&(Ne(e,!0),e.parentElement.style.removeProperty("padding-bottom")),(e=document.getElementById("playback-rate-username"))&&e.style.removeProperty("display")},Ue=()=>{let e=document.getElementsByClassName("lower-row")[0];if(!e)return;let t=e.getElementsByClassName("right-ctnr")[0];if(t){Ne(t,x.checked);let e=a.setTimeout(()=>{a.clearTimeout(e),e=null,Ve()},100)}},Oe=()=>{let e=document.getElementsByClassName("live-area")[0];e&&(((e,t)=>{t?Se(e,"block",!0):e.style.removeProperty("display")})(e,f.checked),Ve())},We=()=>{window.localStorage.setItem("lottery_checked",p.checked);let e=document.getElementById("hesitationCheckboxDiv");e&&Ne(e,!p.checked)},qe=()=>{window.localStorage.setItem("close_lottery_checked",h.checked)},$e=()=>{window.localStorage.setItem("hesitation_checked",g.checked),window.localStorage.setItem("hesitation_expiry",R.value)},Je=()=>{},Qe=()=>{let e=T.checked?Y.defaultKey:ue,t=ce(e,null);t&&ve(t)},Xe=()=>{let e=document.getElementsByClassName("like-btn")[0];e&&e.click()},Ye=()=>{if(A.checked){if(J)return;Xe(),J=a.setInterval(()=>{let e=Math.floor(15e3*Math.random());1e3>e?Xe():Q=a.setTimeout(()=>{a.clearTimeout(Q),Q=null,Xe()},e)},15e3)}else J&&(a.clearInterval(J),J=null),Q&&(a.clearTimeout(Q),Q=null)},Ze=()=>{c.checked?O||(console.log("===> 开启防休眠功能"),O=a.setInterval(()=>{W=a.setTimeout(()=>{a.clearTimeout(W),document.body.dispatchEvent(new MouseEvent("mousemove",{bubbles:!0}))},3e3*Math.random())},17e3)):(console.log("===> 关闭防休眠功能"),O&&(a.clearInterval(O),O=null),W&&(a.clearTimeout(W),W=null))},et=e=>{let t=document.getElementsByClassName("close-btn bg-contain")[0];t&&(me(e)?t.click():closeLotteryTimer=a.setTimeout(()=>{a.clearTimeout(closeLotteryTimer),t.click()},1e3*e))},tt=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=me(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("===> 参加成功,延迟关闭弹窗"),et(1))},t)}else console.log("===> 立刻自动参加抽奖"),e.click(),"true"===window.localStorage.getItem("close_lottery_checked")&&(console.log("===> 参加成功,延迟关闭弹窗"),et(1));else"true"===window.localStorage.getItem("close_lottery_checked")&&(console.log("===> 不参与天选时刻抽奖,关闭弹窗"),et());else console.warn("===> 没有抽奖按钮DOM")},at=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()}})},lt=()=>{let e={};return Y.configKey&&(e=ce(Y.configKey,{}),me(e.lottery)&&(e.lottery=!1),me(e.closeLottery)&&(e.closeLottery=!1),me(e.hesitation)&&(e.hesitation=!1)),e},nt=(e,t)=>{let a=document.getElementById("danmu-setting-panel");if(e&&!a){let a=document.getElementsByClassName("bl-button bl-button--primary")[0];if(!a)return console.warn("===> 发送按钮丢失"),!1;if((()=>{let e=document.createElement("div");e.textContent="弹幕设置",e.classList.add("danmu-random-setting-title");let t=document.createElement("div");t.textContent="1.7.0",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>分隔',(V=document.createElement("div")).classList.add("module-update-info"),V.innerHTML='<span class="update-info-text">更新提示:</span><span class="update-info-text" style="color:#0b81cc;">适配新版页面UI</span>';let G=document.createElement("div");G.textContent="分组 1 :",G.classList.add("danmu-group-title"),(C=document.createElement("input")).type="checkbox",C.id="group1Checkbox",C.checked=!0;let U=document.createElement("label");U.setAttribute("for","group1Checkbox"),U.classList.add("switch-check-label");let O=document.createElement("div");O.classList.add("switch-check"),O.appendChild(C),O.appendChild(U),(M=document.createElement("textarea")).classList.add("danmu-group-textarea"),M.setAttribute("placeholder","请输入弹幕,多条弹幕请用“|”分隔");let W=document.createElement("div");W.textContent="分组 2 :",W.classList.add("danmu-group-title"),(E=document.createElement("input")).type="checkbox",E.id="group2Checkbox",E.checked=!0;let q=document.createElement("label");q.setAttribute("for","group2Checkbox"),q.classList.add("switch-check-label");let $=document.createElement("div");$.classList.add("switch-check"),$.appendChild(E),$.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"),(w=document.createElement("input")).type="checkbox",w.id="group3Checkbox",w.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(w),X.appendChild(Q),(_=document.createElement("textarea")).classList.add("danmu-group-textarea"),_.setAttribute("placeholder","请输入弹幕,多条弹幕请用“|”分隔");let Y=document.createElement("div");Y.textContent="分组 4 :",Y.classList.add("danmu-group-title"),(L=document.createElement("input")).type="checkbox",L.id="group4Checkbox",L.checked=!0;let Z=document.createElement("label");Z.setAttribute("for","group4Checkbox"),Z.classList.add("switch-check-label");let ee=document.createElement("div");ee.classList.add("switch-check"),ee.appendChild(L),ee.appendChild(Z),(D=document.createElement("textarea")).classList.add("danmu-group-textarea"),D.setAttribute("placeholder","请输入弹幕,多条弹幕请用“|”分隔");let te=document.createElement("div");te.textContent="分组 5 :",te.classList.add("danmu-group-title"),(B=document.createElement("input")).type="checkbox",B.id="group5Checkbox",B.checked=!0;let ae=document.createElement("label");ae.setAttribute("for","group5Checkbox"),ae.classList.add("switch-check-label");let le=document.createElement("div");le.classList.add("switch-check"),le.appendChild(B),le.appendChild(ae),(z=document.createElement("textarea")).classList.add("danmu-group-textarea"),z.setAttribute("placeholder","请输入弹幕,多条弹幕请用“|”分隔"),(K=document.createElement("span")).textContent="设置弹幕每",K.classList.add("danmu-text-span"),K.style.marginLeft="4px",(S=document.createElement("input")).value=600,S.classList.add("danmu-second-input"),S.setAttribute("oninput","this.value = this.value.replace(/[^0-9]/g, '')"),(j=document.createElement("span")).textContent="秒发送一次",j.classList.add("danmu-text-span"),j.style.marginRight="4px";let ne=document.createElement("div");ne.appendChild(K),ne.appendChild(S),ne.appendChild(j);let de=document.createElement("div");de.appendChild(G),de.appendChild(O),de.appendChild(M),de.appendChild(W),de.appendChild($),de.appendChild(P),de.appendChild(J),de.appendChild(X),de.appendChild(_),de.appendChild(Y),de.appendChild(ee),de.appendChild(D),de.appendChild(te),de.appendChild(le),de.appendChild(z),de.appendChild(ne),I=Ie("rdCheckbox","随机从上面的弹幕中选出一条发送","将合并所有分组数据,从中随机选出一条发送",null,de),T=Ie("usePublicCheckbox","使用共用弹幕源","使用设置为共用弹幕作为弹幕源",Qe,de),A=Ie("autoLikeCheckbox","自动点赞该直播间","每15秒内随机一个时间点点赞一次直播间(点赞1000次大概需要4小时)",Ye,de,null,null,null,null);let ie=document.createElement("div");ie.textContent="以上设置对应各个直播间独立保存,无需刷新",ie.title="请点击设置面板底下的“✓”进行保存",ie.classList.add("global-setting-tip"),ie.classList.add("switch-check-group"),de.appendChild(ie);let ce=document.createElement("div");ce.style.margin="20px 0 10px",(ie=document.createElement("div")).textContent="以下设置,需刷新其它直播间才能适用",ie.title="请点击设置面板底下的“✓”进行保存",ie.classList.add("global-setting-tip"),ie.classList.add("switch-check-group"),ce.appendChild(ie),(F=document.createElement("input")).id="signInputText",F.style.border="0",F.style.width="90px",F.setAttribute("placeholder","输入打卡的文字"),(R=document.createElement("input")).style.border="0",R.style.width="55px",R.setAttribute("placeholder","单位:秒"),R.setAttribute("oninput","this.value = this.value.replace(/[^0-9]/g, '')"),k=Ie("setPublicCheckbox","设为共用弹幕源","把这个直播间的弹幕共享给其它直播间使用,先后设置时,后面的会覆盖前面的设置",Je,ce),l=Ie("signInCheckbox","打卡弹幕(需登录):","每日零点发送一条打卡弹幕",be,ce,null,null,!1,F),p=Ie("lotteryCheckbox","自动参与天选时刻抽奖(需登录)","自动点击参与按钮,请确保已经登录了阿B账号",We,ce),g=Ie("hesitationCheckbox","随机犹豫期:","(尝试应对人机校验,不一定有效,随机的范围:(0, 填的数字])不立刻参与天选时刻,这期间可以手动处理,免得自动参加后后悔(时间单位:秒)",$e,ce,"23px","90%",!0,R),h=Ie("closeLotteryCheckbox","关闭天选时刻","关闭天选时刻弹窗",qe,ce),o=Ie("hideGiftControlCheckbox","隐藏礼物栏","隐藏播放器底部的礼物栏",De,ce),c=Ie("noSleepCheckbox","防止直播间休眠","防止直播间页面一段时间没操作之后进入休眠",Ze,ce),n=Ie("hideLoginGuideCheckbox","隐藏播放器底部登录提示","隐藏未登录时播放器底部显示的登录提示",Me,ce),d=Ie("hideHarunaCheckbox","隐藏看板娘立绘","隐藏直播间Haruna立绘",Pe,ce),i=Ie("hideShopCheckbox","隐藏购物提示","隐藏播放器左上角的商店购物提示",_e,ce),s=Ie("hideRoomFeedCheckbox","隐藏主播动态","隐藏播放器底下主播的动态栏",ze,ce),r=Ie("hideRoomInfoCheckbox","隐藏主播荣耀、简介","隐藏播放器底下主播的荣耀勋章和简介",Fe,ce),u=Ie("hideNoticeCheckbox","隐藏主播公告","隐藏弹幕列表底下主播的公告",Re,ce),m=Ie("hideFooterCheckbox","隐藏直播间页脚","隐藏直播间底部的网页页脚",Ge,ce),b=Ie("hidePrivacyCheckbox","隐藏隐私提示对话框","隐藏隐私提示登录的对话框,被打码的昵称不保证变回正常",Ke,ce),v=Ie("hideRoomStatusCheckbox","隐藏直播水印","隐藏播放器左上角的直播水印",je,ce),y=Ie("hideBusinessCheckbox","隐藏商业性互动","隐藏全站广播、PK、连MIC、连视频等",He,ce),x=Ie("hideRankListCheckbox","隐藏滚动排行榜","隐藏顶部的人气榜、航海榜、礼物星球等",Ue,ce),f=Ie("showLiveArea","显示直播分区","显示直播间所属的直播分区",Oe,ce),(H=document.createElement("span")).classList.add("danmu-random-setting-success-text");let oe=document.createElement("div");oe.classList.add("danmu-random-setting-success-tips"),oe.appendChild(H);let se=document.createElement("button");se.style.setProperty("display","none"),se.textContent="清除缓存",se.classList.add("clean-cache-btn"),se.addEventListener("click",we);let re=document.createElement("i");re.setAttribute("title","保存"),re.style.padding="5px",re.classList.add("el-button"),re.classList.add("el-icon-check"),re.classList.add("is-circle"),re.addEventListener("click",Ee);let ue=document.createElement("i");ue.setAttribute("title","关闭"),ue.style.padding="5px",ue.classList.add("el-button"),ue.classList.add("el-icon-close"),ue.classList.add("is-circle"),ue.addEventListener("click",xe);let me=document.createElement("div");me.classList.add("danmu-random-set-button-container"),me.appendChild(se),me.appendChild(re),me.appendChild(ue);let pe=document.createElement("div");pe.classList.add("danmu-random-setting-bottom"),pe.appendChild(oe),pe.appendChild(me);let he=document.createElement("div");he.id="otherContainer";let ge=document.createElement("div");ge.style.height="calc(98% - 30px - 25px)",ge.appendChild(de),ge.appendChild(ce),ge.appendChild(he),ge.appendChild(pe),(N=document.createElement("div")).id="danmu-setting-panel",N.classList.add("danmu-random-setting-panel"),N.appendChild(e),N.appendChild(V),N.appendChild(a),N.appendChild(ge),document.getElementById("aside-area-vm").appendChild(N)})(),(e=>{if((U=document.createElement("span")).textContent="开始",U.title="开始定时发送",U.classList.add("txt"),(G=document.createElement("button")).title="开始定时发送",G.addEventListener("click",Be),G.appendChild(U),e){Ae(e,G);const t=e.querySelector("span");t&&Ae(t,U)}else G.classList.add("danmu-btn"),G.style.setProperty("--color","rgba(217,157,27,0.8)")})(a),t)G.style.marginTop="4px",G.style.marginLeft="30px",a.style.marginLeft="30px",e.appendChild(G),e.parentNode.insertBefore(Te(),e);else{let t=document.createElement("div");t.style.position="absolute",t.appendChild(G),t.appendChild(Te()),e.appendChild(t)}(()=>{let e=ce(ue,null),t=ue;if(e){if(e.usePublic&&Y.defaultKey){let t=ce(Y.defaultKey,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=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=lt(),F.value=me(Z.signInText)?"":Z.signInText,R.value=me(Z.hesitationExpiry)?"100":Z.hesitationExpiry,ve(X),ke(),fe()})()}return!0},dt=(e,t)=>{ee[ee.length]=a.setInterval(()=>{nt(e,t)?ge():0>=--ne&&(ge(),console.log("===> 创建面板失败,停止初始化"))},1500)},it=(e,t)=>{let l=document.getElementsByClassName(e)[0];if(l)dt(l,t);else{let n=0;$=a.setInterval(()=>{(l=document.getElementsByClassName(e)[0])?(a.clearInterval($),dt(l,t)):n++>=10&&a.clearInterval($)},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:#d4f2e0;border-radius:2px;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-align:center;font-size:13px;font-weight:700;margin:8px 0;padding:2px 0;background-color:#90e7f5;}.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=(()=>{0<pe("2.4.2",Y.version)?window.location.href=re:((()=>{let e=document.getElementsByClassName("particitation-btn")[0];e?tt(e):q=a.setTimeout(()=>{a.clearTimeout(q),(e=document.getElementsByClassName("particitation-btn")[0])&&tt(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)&&(at(e.children),new MutationObserver(e=>{!e||0>=e.length||Array.prototype.forEach.call(e,e=>at(e.addedNodes))}).observe(e,t))})})},500)})(),(()=>it("bottom-actions p-relative",!1))(),(()=>it("right-actions border-box",!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.setParentData=(e=>Y=e),window.checkVersion=(()=>{if((Z=lt())&&Z.moduleVersion&&V&&0<pe(Z.moduleVersion,"1.7.0")){V.innerHTML='<span class="update-info-text">有新版本更新,请刷新网页</span>';let e=document.getElementById("otherContainer");e&&e.appendChild(V.cloneNode(!0))}})}();