Greasy Fork

b-live-random-send-test

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

当前为 2023-07-12 提交的版本,查看 最新版本

此脚本不应直接安装。它是供其他脚本使用的外部库,要使用该库请加入元指令 // @require https://update.greasyfork.icu/scripts/447936/1219116/b-live-random-send-test.js

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