mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
1 line
511 B
JavaScript
1 line
511 B
JavaScript
(()=>{return(t,e)=>{(async()=>{const e=await SpinQuery.select(()=>document.querySelector(`input[key=defaultPlayerLayout]`));if(!e){return}const o="stardustvideo";const n="旧版";const a="新版";const c={[n]:0,[a]:2};const i=document.cookie.split(";").filter(t=>t.includes(o+"=0")).length>0?n:a;function u(t){document.cookie=`${o}=${c[t]};path=/;domain=.bilibili.com;max-age=31536000`;window.location.reload()}$(e).on("change",()=>{u(e.value)});if(t.defaultPlayerLayout!==i){u(t.defaultPlayerLayout)}})()}})(); |