mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
1 line
657 B
JavaScript
1 line
657 B
JavaScript
(()=>{return(i,n)=>{return{widget:{content:`<div class="bvid-convert"></div>`,condition:async()=>{if(["https://www.bilibili.com/video/","https://www.bilibili.com/bangumi/"].some(i=>document.URL.startsWith(i))){return Boolean(await SpinQuery.select(()=>unsafeWindow.aid||unsafeWindow.bvid))}else{return false}},success:()=>{n.applyStyle("bvidConvertStyle");const i=dq(".bvid-convert");const e=(()=>{if(unsafeWindow.bvid){return unsafeWindow.bvid}const i=dq(".av-link,.bv-link,.bvid-link");return i.innerHTML||"未找到BV号"})();i.innerHTML=`\n<div class="bvid-convert-item">av${unsafeWindow.aid}</div>\n<div class="bvid-convert-item">${e}</div>\n`}}}}})(); |