About to drop 500 characters of horrible javascript code in the reply to this post, so don't screenread it. I will add the CW "code" but I won't have enough characters to explain further in that post! So watch out!:

code 

<html><body><input type=file><ol /><script>(($)=>{var c,d,f,g,i=(j)=>{return $.querySelector(j)},k=(l,m,n)=>{return l.addEventListener(m,n)},a=i('input'),b=i('ol');k(a,'input',()=>{c=new FileReader();k(c,'load',(e)=>{JSON.parse(e.target.result).orderedItems.map((d)=>{g=d.object;"string"!==typeof g&&(f=$.createElement("li"),f.innerHTML='<a href="'+g.id+'">'+(g.content||g.published).replace(/<[^>]+>/g,'')+'</a>',b.appendChild(f))})});c.readAsText(a.files[0])})})(document);</script></body>

Follow

code 

<!doctype html><html><body><input type=file><ol /><script>(($)=>{var a='input',b=new FileReader(),c,d,e=(x)=>$.querySelector(x),f=(x,y,z)=>x.addEventListener(y,z),g=e(a),h=e('ol');f(g,a,()=>{f(b,'load',()=>JSON.parse(b.result).orderedItems.map((x)=>{d=x.object;"string"===typeof d||(c=$.createElement("li"),c.innerHTML='<a href="'+d.id+'">'+(d.content||d.published).replace(/<[^>]+>/g,'')+'</a>',h.append(c))}));b.readAsText(g.files[0])})})(document)</script></body></html>

this is a squished version of yesterday's mastodon archive reader code. improved a wee bit by learning more about arrow functions, and squishing it enough to get a legal HTML doctype and closing tags (which the last one had to skip for character space)

yeah! it's an in-browser Mastodon archive reader that fits in a toot!

Sign in to participate in the conversation
this godforsaken website

godforsaken.website is a uk-based mastodon instance boasting literally thousands of posts about bumholes and UNESCO world heritage sites