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