mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
1 line
679 B
JavaScript
1 line
679 B
JavaScript
(()=>(t,e)=>{(async()=>{const t=["https://www.bilibili.com/video/","https://www.bilibili.com/watchlater/","https://www.bilibili.com/medialist/play/"];if(!t.some((t=>document.URL.startsWith(t)))){return}const i={enable:[".multi-page .next-button",".player-auxiliary .player-auxiliary-autoplay-switch:not(:empty)"],disable:[".recommend-list .next-button"]};const a=t=>Boolean(t.querySelector(".switch-button.on, input:checked"));const{playerReady:l}=await e.importAsync("player-ready");await l();const o=await SpinQuery.select([...i.enable,...i.disable].join(","));if(!o){return}const n=i.enable.some((t=>o.matches(t)));const c=a(o);console.log(c,n,o);if(n!==c){o.click()}})()})(); |