您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
定时从设置的字幕中随机取出一条在B站直播间发送,需先登录B站账号
当前为
此脚本不应直接安装。它是供其他脚本使用的外部库,要使用该库请加入元指令 // @require https://update.greasyfork.icu/scripts/447936/1320800/b-live-random-send-test.js
// ==UserScript== // @version 1.6.1 // ==/UserScript== !function(){window.autoSendDanmuModuleLoaded=!1;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,d)=>{const n=++a.id;return a.callbacks[n]={fn:e,context:d},t.postMessage({command:"interval:start",interval:l,id:n}),n},setTimeout:(e,l,d)=>{const n=++a.id;return a.callbacks[n]={fn:e,context:d},t.postMessage({command:"timeout:start",timeout:l,id:n}),n},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,d,n,i,c,o,s,r,u,m,h,p,g,b,k,v,y,x,f,w,C,E,L,B,I,T,A,S,P,M,N,_,D,F,R,z,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,de=200,ne=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)},he=(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),d=Math.max(a.length,l.length);for(let e=0;e<d;e++){if((a[e]||0)>(l[e]||0))return 1;if((a[e]||0)<(l[e]||0))return-1}return 0},pe=()=>(new Date).getTime(),ge=(e,t)=>{let a=document.getElementById("aside-area-vm").getElementsByClassName("chat-input border-box")[0];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(),lastSent=pe()):alert("找不到发送按钮,请尝试刷新页面")},be=()=>{for(let e=0;e<ee.length;e++)a.clearInterval(ee[e]),ee[e]=null;ee=[]},ke=()=>{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()-pe();console.log("===> 设置凌晨打卡定时器【"+t+"】"),R.value=me(Z.signInText)?e:Z.signInText,le=a.setTimeout(()=>{ge(me(R.value)?e:R.value),console.log("===> 设置下一次打卡"),a.clearTimeout(le),le=null,ke()},t)}}else le&&(console.log("===> 关闭自动打卡功能"),a.clearTimeout(le),le=null)},ve=e=>{M.value=e.data1.values.length?e.data1.values.join("|"):[],N.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("|"):[],F.value=e.data5.values.length?e.data5.values.join("|"):[]},ye=()=>{v.checked=!1,I.checked=X.random,A.checked=X.like,T.checked=X.usePublic,w.checked=X.data1.available,C.checked=X.data2.available,E.checked=X.data3.available,L.checked=X.data4.available,B.checked=X.data5.available,l.checked=Z.autoSignIn,c.checked=Z.noSleep,d.checked=Z.hideLoginGuide,n.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,h.checked=Z.lottery,g.checked=Z.hesitation,p.checked=Z.closeLottery,b.checked=Z.noPrivacy,k.checked=Z.hideWatermark,y.checked=Z.hideBusiness,x.checked=Z.hideRankList,f.checked=Z.showLiveArea,(()=>{Je(),ze(),_e(),Pe(),Me(),Ne(),Ge(),Ke(),je(),Ve(),Ye(),ke(),Oe(),$e(),We(),Xe(),De(),Fe(),Re(),Ue();let e=a.setTimeout(()=>{a.clearTimeout(e),De(),Fe(),Re(),Ue()},1e3)})()},xe=()=>P.style.display="block",fe=()=>{ye(),P.style.display="none"},we=()=>{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):ne=0},Ce=(e,t,l)=>{V.textContent=e,V.style.display="block",V.style.color=l||"#128712";let d=a.setTimeout(()=>{a.clearTimeout(d),V.style.display="none",V.textContent="",t&&(P.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=R.value,Z.noSleep=c.checked,Z.hideLoginGuide=d.checked,Z.hideHaruna=n.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=h.checked,window.localStorage.setItem("lottery_checked",h.checked),Z.hesitation=g.checked,window.localStorage.setItem("hesitation_checked",g.checked),Z.hesitationExpiry=z.value,window.localStorage.setItem("hesitation_expiry",z.value),Z.closeLottery=p.checked,window.localStorage.setItem("close_lottery_checked",Z.closeLottery),Z.noPrivacy=b.checked,Z.hideWatermark=k.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(N.value)?[]:N.value.split("|"),a=me(_.value)?[]:_.value.split("|"),S=me(D.value)?[]:D.value.split("|"),P=me(F.value)?[]:F.value.split("|");if(X.random=I.checked,X.like=A.checked,X.usePublic=T.checked,X.data1.available=w.checked,X.data2.available=C.checked,X.data3.available=E.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=P),oe(ue,X),v.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=P,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=P),we(),Ce("设置成功",!0)},Le=()=>{Y.configKey&&Z?(Z.script="",Z.lastUpdate="清除缓存",oe(Y.configKey,Z),Ce("清除成功")):(console.warn("元数据丢失"),Ce("操作失败",!1,"red"))},Be=()=>te.length<1?(alert("请先设置弹幕"),!1):(I.checked&&(ne=Math.floor(Math.random()*te.length)),ge(te[ne]),++ne>=te.length&&(ne=0),!0),Ie=()=>{let e=0;if(ae)a.clearInterval(ae),ae=null,G.style.background=me(H)?"rgba(217,157,27,1)":H,G.style.setProperty("--color",H.replace(")",", 0.8)")),G.textContent="开始",S.removeAttribute("disabled");else{if(e=1e3*(me(S.value)?600:S.value),!Be())return;ae=a.setInterval(Be,e),G.style.background="rgba(255,0,0,1)",G.style.setProperty("--color","rgba(255,0,0,0.8)"),G.textContent="停止",S.setAttribute("disabled","disabled")}},Te=(e,t,a,l,d,n,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 h=document.createElement("div");return h.id=e+"Div",h.classList.add("switch-check"),h.classList.add("switch-check-group"),h.appendChild(r),h.appendChild(u),h.appendChild(m),me(n)||(h.style.marginLeft=n),me(i)||(h.style.width=i),c&&h.style.setProperty("display","none"),o&&h.appendChild(o),d.appendChild(h),r},Ae=(e,t,a)=>{a?e.style.setProperty("display",t,"important"):e.style.setProperty("display",t)},Se=(e,t)=>{t?Ae(e,"none",!0):e.style.removeProperty("display")},Pe=()=>{let e=document.getElementById("switch-login-guide-vm");e&&Se(e,d.checked)},Me=()=>{let e=document.getElementById("my-dear-haruna-vm");e&&Se(e,n.checked)},Ne=()=>{let e=document.getElementById("shop-popover-vm");e&&Se(e,i.checked)},_e=()=>{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)")}},De=()=>{let e=document.getElementsByClassName("room-feed")[0];e&&Se(e,s.checked),(e=document.getElementsByClassName("flip-view p-relative")[0])&&Se(e,s.checked)},Fe=()=>{let e=document.getElementsByClassName("room-info-ctnr")[0];e&&Se(e,r.checked)},Re=()=>{let e=document.getElementsByClassName("right-container")[0];e&&(e.style.setProperty("min-height","auto"),Se(e,u.checked))},ze=()=>{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()}},Ke=()=>{let e=document.getElementsByClassName("web-player-icon-roomStatus")[0];e&&Se(e,k.checked)},je=()=>{let e=document.getElementById("businessContainerElement");e&&Se(e,y.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,x.checked);let e=a.setTimeout(()=>{a.clearTimeout(e),e=null,He()},100)}},Ue=()=>{let e=document.getElementsByClassName("live-area")[0];e&&(((e,t)=>{t?Ae(e,"block",!0):e.style.removeProperty("display")})(e,f.checked),He())},Oe=()=>{window.localStorage.setItem("lottery_checked",h.checked);let e=document.getElementById("hesitationCheckboxDiv");e&&Se(e,!h.checked)},We=()=>{window.localStorage.setItem("close_lottery_checked",p.checked)},$e=()=>{window.localStorage.setItem("hesitation_checked",g.checked),window.localStorage.setItem("hesitation_expiry",z.value)},qe=()=>{},Je=()=>{let e=T.checked?Y.defaultKey:ue,t=ce(e,null);t&&ve(t)},Qe=()=>{let e=document.getElementsByClassName("like-btn")[0];e&&e.click()},Xe=()=>{if(A.checked){if(J)return;Qe(),J=a.setInterval(()=>{let e=Math.floor(15e3*Math.random());1e3>e?Qe():Q=a.setTimeout(()=>{a.clearTimeout(Q),Q=null,Qe()},e)},15e3)}else J&&(a.clearInterval(J),J=null),Q&&(a.clearTimeout(Q),Q=null)},Ye=()=>{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))},Ze=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))},et=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)?1e4:1e3*t;let l=a.setTimeout(()=>{a.clearTimeout(l),console.log("===> 犹豫期过后自动参加抽奖"),e.click(),"true"===window.localStorage.getItem("close_lottery_checked")&&(console.log("===> 参加成功,延迟关闭弹窗"),Ze(1))},t)}else console.log("===> 立刻自动参加抽奖"),e.click(),"true"===window.localStorage.getItem("close_lottery_checked")&&(console.log("===> 参加成功,延迟关闭弹窗"),Ze(1));else"true"===window.localStorage.getItem("close_lottery_checked")&&(console.log("===> 不参与天选时刻抽奖,关闭弹窗"),Ze());else console.warn("===> 没有抽奖按钮DOM")},tt=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 d=l.children[1];if(!d)return;let n=d.children[0];if(!n)return;t.title=n.textContent;let i=a.children[0];if(i){let e=i.lastChild;e&&e.style.display&&"none"==e.style.display&&e.remove()}})},at=()=>{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},lt=e=>{let t=document.getElementById("danmu-setting-panel");if(e&&!t){let t=document.getElementsByClassName("bl-button bl-button--primary")[0];if(!t)return console.warn("===> 发送按钮丢失"),!1;(e=>{let t=document.createElement("div");t.textContent="弹幕设置",t.classList.add("danmu-random-setting-title");let a=document.createElement("div");a.textContent="1.6.1",a.classList.add("danmu-random-setting-title-sub"),t.appendChild(a);let H=document.createElement("div");H.classList.add("danmu-random-setting-tips"),H.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:#0b81cc;">去除直播间列表预览时的遮罩层</span>';let O=document.createElement("div");O.textContent="分组 1 :",O.classList.add("danmu-group-title"),(w=document.createElement("input")).type="checkbox",w.id="group1Checkbox",w.checked=!0;let W=document.createElement("label");W.setAttribute("for","group1Checkbox"),W.classList.add("switch-check-label");let $=document.createElement("div");$.classList.add("switch-check"),$.appendChild(w),$.appendChild(W),(M=document.createElement("textarea")).classList.add("danmu-group-textarea"),M.setAttribute("placeholder","请输入弹幕,多条弹幕请用“|”分隔");let q=document.createElement("div");q.textContent="分组 2 :",q.classList.add("danmu-group-title"),(C=document.createElement("input")).type="checkbox",C.id="group2Checkbox",C.checked=!0;let J=document.createElement("label");J.setAttribute("for","group2Checkbox"),J.classList.add("switch-check-label");let Q=document.createElement("div");Q.classList.add("switch-check"),Q.appendChild(C),Q.appendChild(J),(N=document.createElement("textarea")).classList.add("danmu-group-textarea"),N.setAttribute("placeholder","请输入弹幕,多条弹幕请用“|”分隔");let X=document.createElement("div");X.textContent="分组 3 :",X.classList.add("danmu-group-title"),(E=document.createElement("input")).type="checkbox",E.id="group3Checkbox",E.checked=!0;let Y=document.createElement("label");Y.setAttribute("for","group3Checkbox"),Y.classList.add("switch-check-label");let Z=document.createElement("div");Z.classList.add("switch-check"),Z.appendChild(E),Z.appendChild(Y),(_=document.createElement("textarea")).classList.add("danmu-group-textarea"),_.setAttribute("placeholder","请输入弹幕,多条弹幕请用“|”分隔");let ee=document.createElement("div");ee.textContent="分组 4 :",ee.classList.add("danmu-group-title"),(L=document.createElement("input")).type="checkbox",L.id="group4Checkbox",L.checked=!0;let te=document.createElement("label");te.setAttribute("for","group4Checkbox"),te.classList.add("switch-check-label");let ae=document.createElement("div");ae.classList.add("switch-check"),ae.appendChild(L),ae.appendChild(te),(D=document.createElement("textarea")).classList.add("danmu-group-textarea"),D.setAttribute("placeholder","请输入弹幕,多条弹幕请用“|”分隔");let le=document.createElement("div");le.textContent="分组 5 :",le.classList.add("danmu-group-title"),(B=document.createElement("input")).type="checkbox",B.id="group5Checkbox",B.checked=!0;let de=document.createElement("label");de.setAttribute("for","group5Checkbox"),de.classList.add("switch-check-label");let ne=document.createElement("div");ne.classList.add("switch-check"),ne.appendChild(B),ne.appendChild(de),(F=document.createElement("textarea")).classList.add("danmu-group-textarea"),F.setAttribute("placeholder","请输入弹幕,多条弹幕请用“|”分隔");let ie=document.createElement("div");ie.appendChild(O),ie.appendChild($),ie.appendChild(M),ie.appendChild(q),ie.appendChild(Q),ie.appendChild(N),ie.appendChild(X),ie.appendChild(Z),ie.appendChild(_),ie.appendChild(ee),ie.appendChild(ae),ie.appendChild(D),ie.appendChild(le),ie.appendChild(ne),ie.appendChild(F),I=Te("rdCheckbox","随机从上面的弹幕中选出一条发送","将合并所有分组数据,从中随机选出一条发送",null,ie),T=Te("usePublicCheckbox","使用共用弹幕源","使用设置为共用弹幕作为弹幕源",Je,ie),A=Te("autoLikeCheckbox","自动点赞该直播间","每15秒内随机一个时间点点赞一次直播间(点赞1000次大概需要4小时)",Xe,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","输入打卡的文字"),(z=document.createElement("input")).style.border="0",z.style.width="55px",z.setAttribute("placeholder","单位:秒"),z.setAttribute("oninput","this.value = this.value.replace(/[^0-9]/g, '')"),v=Te("setPublicCheckbox","设为共用弹幕源","把这个直播间的弹幕共享给其它直播间使用,先后设置时,后面的会覆盖前面的设置",qe,oe),l=Te("signInCheckbox","打卡弹幕(需登录):","每日零点发送一条打卡弹幕",ke,oe,null,null,!1,R),h=Te("lotteryCheckbox","自动参与天选时刻抽奖(需登录)","自动点击参与按钮,请确保已经登录了阿B账号",Oe,oe),g=Te("hesitationCheckbox","犹豫期:","不立刻参与天选时刻,这期间可以手动处理,免得自动参加后后悔(时间单位:秒)",$e,oe,"23px","90%",!0,z),p=Te("closeLotteryCheckbox","关闭天选时刻","关闭天选时刻弹窗",We,oe),o=Te("hideGiftControlCheckbox","隐藏礼物栏","隐藏播放器底部的礼物栏",_e,oe),c=Te("noSleepCheckbox","防止直播间休眠","防止直播间页面一段时间没操作之后进入休眠",Ye,oe),d=Te("hideLoginGuideCheckbox","隐藏播放器底部登录提示","隐藏未登录时播放器底部显示的登录提示",Pe,oe),n=Te("hideHarunaCheckbox","隐藏看板娘立绘","隐藏直播间Haruna立绘",Me,oe),i=Te("hideShopCheckbox","隐藏购物提示","隐藏播放器左上角的商店购物提示",Ne,oe),s=Te("hideRoomFeedCheckbox","隐藏主播动态","隐藏播放器底下主播的动态栏",De,oe),r=Te("hideRoomInfoCheckbox","隐藏主播荣耀、简介","隐藏播放器底下主播的荣耀勋章和简介",Fe,oe),u=Te("hideNoticeCheckbox","隐藏主播公告","隐藏弹幕列表底下主播的公告",Re,oe),m=Te("hideFooterCheckbox","隐藏直播间页脚","隐藏直播间底部的网页页脚",ze,oe),b=Te("hidePrivacyCheckbox","隐藏隐私提示对话框","隐藏隐私提示登录的对话框,被打码的昵称不保证变回正常",Ge,oe),k=Te("hideRoomStatusCheckbox","隐藏直播水印","隐藏播放器左上角的直播水印",Ke,oe),y=Te("hideBusinessCheckbox","隐藏商业性互动","隐藏全站广播、PK、连MIC、连视频等",je,oe),x=Te("hideRankListCheckbox","隐藏滚动排行榜","隐藏顶部的人气榜、航海榜、礼物星球等",Ve,oe),f=Te("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.textContent="清除缓存",re.classList.add("clean-cache-btn"),re.addEventListener("click",Le);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",Ee);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",fe);let he=document.createElement("div");he.classList.add("danmu-random-set-button-container"),he.appendChild(re),he.appendChild(ue),he.appendChild(me);let pe=document.createElement("div");pe.classList.add("danmu-random-setting-bottom"),pe.appendChild(se),pe.appendChild(he);let ge=document.createElement("div");ge.id="otherContainer";let be=document.createElement("div");be.style.height="calc(98% - 30px - 25px)",be.appendChild(ie),be.appendChild(oe),be.appendChild(ge),be.appendChild(pe),(P=document.createElement("div")).id="danmu-setting-panel",P.classList.add("danmu-random-setting-panel"),P.appendChild(t),P.appendChild(U),P.appendChild(H),P.appendChild(be),document.getElementById("aside-area-vm").appendChild(P),(G=document.createElement("button")).textContent="开始",G.classList.add("danmu-btn"),G.style.setProperty("--color","rgba(217,157,27,0.8)"),G.addEventListener("click",Ie),(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 ve=document.createElement("i");ve.classList.add("el-icon-setting");let ye=document.createElement("button");ye.title="设置",ye.classList.add("el-button"),ye.classList.add("el-button--mini"),ye.classList.add("is-circle"),ye.addEventListener("click",xe),ye.appendChild(ve);let we=document.createElement("div");we.style.position="absolute",we.appendChild(G),we.appendChild(K),we.appendChild(S),we.appendChild(j),we.appendChild(ye),e.appendChild(we)})(e),H=window.getComputedStyle(t).getPropertyValue("background-color"),j.style.setProperty("background",H),K.style.setProperty("background",H),G.style.setProperty("background",H),G.style.setProperty("--color",H.replace(")",", 0.8)")),(()=>{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=at(),R.value=me(Z.signInText)?"":Z.signInText,z.value=me(Z.hesitationExpiry)?"10":Z.hesitationExpiry,ve(X),ye(),we()})()}return!0},dt=e=>{ee[ee.length]=a.setInterval(()=>{lt(e)?be():0>=--de&&(be(),console.log("===> 创建面板失败,停止初始化"))},1500)};(()=>{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:rgb(255, 255, 255);font-size:12px;background:rgb(236,108,27);}.danmu-second-input{width:25px;height:15px;margin:0px 3px;border:0px;border-radius:3px;}.not-display{display:none !important;}',document.head.appendChild(t)})(),window.runStart=(()=>{0<he("2.4.2",Y.version)?window.location.href=re:((()=>{let e=document.getElementsByClassName("particitation-btn")[0];e?et(e):$=a.setTimeout(()=>{a.clearTimeout($),(e=document.getElementsByClassName("particitation-btn")[0])&&et(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)&&(tt(e.children),new MutationObserver(e=>{!e||0>=e.length||Array.prototype.forEach.call(e,e=>tt(e.addedNodes))}).observe(e,t))})})},500)})(),(()=>{let e=document.getElementsByClassName("bottom-actions p-relative")[0];if(e)dt(e);else{let t=0;q=a.setInterval(()=>{(e=document.getElementsByClassName("bottom-actions p-relative")[0])?(a.clearInterval(q),dt(e)):t++>=10&&(a.clearInterval(q),console.log(`===> 页面【${window.location.href}】没有定位位置`))},1e3)}})())}),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=at())&&Z.moduleVersion&&U&&0<he(Z.moduleVersion,"1.6.1")){U.innerHTML='<span class="update-info-text">有新版本更新,请刷新网页</span>';let e=document.getElementById("otherContainer");e&&e.appendChild(U.cloneNode(!0))}}),window.autoSendDanmuModuleLoaded=!0}();