(async(d=document,s=(_=>new Promise((r=>setTimeout(r,2e3)))),m=JSON.parse(d.querySelector('#initial-state').textContent).meta,n=(m?'https://'+location.host+'/api/v1/accounts/'+m.me+'/statuses?limit=40':0),a=(m?{headers:{Authorization:'Bearer '+m.access_token}}:{}),l=[],p=prompt('取得の目安','500'),h)=>{while(n&&l.length
(n=r.headers.has('Link')&&(h=r.headers.get('Link').match(/<(.+?)>; rel="next"/))?h[1]:0,r.json()))).then((j=>l=l.concat(j.map?j.map((i=>(delete i.account,i))):[])));console.log(l.length,n);await s()}location.href=URL.createObjectURL(new Blob([JSON.stringify(l)],{type:'application/octet-stream'}))})();