mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
1 line
668 B
JavaScript
1 line
668 B
JavaScript
(()=>(a,e)=>{(async()=>{const{forEachFeedsCard:a,addMenuItem:t}=await e.importAsync("feeds-apis");const n=a=>{t(a,{className:"image-export",text:"导出图片",action:async()=>{const t=[];dqa(a.element,"img, .img-content").forEach((a=>{const e=retrieveImageUrl(a);if(e){t.push(e)}}));if(t.length===0){Toast.info("此条动态没有检测到任何图片.","动态图片导出");return}const{DownloadPackage:n}=await e.importAsync("download-package");const o=await Promise.all(t.map((({url:a})=>Ajax.getBlob(a))));const s=new n;o.forEach(((e,n)=>s.add(`${a.username}-${a.id}-${n}${t[n].extension}`,e)));await s.emit(`${a.username}-${a.id}.zip`)}})};a({added:n})})()})(); |