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