Show HN: HN Avatars in 357 bytes
Paste the following into the console of any HN page - for annotated avatars on all HN comments. (self contained code)<p><pre><code>  for(u of document.querySelectorAll(&#x27;.hnuser&#x27;))for(u.prepend(c=document.createElement(&#x27;canvas&#x27;)),x=c.getContext(&#x27;2d&#x27;),c.width=18,c.height=14,s=u.innerText,r=1,i=28+s.length;i--;i&lt;28?r&gt;&gt;&gt;29&gt;X*X&#x2F;3+Y&#x2F;2&amp;&amp;x.fillRect(6+2*X,2*Y,2,2)&amp;x.fillRect(6-2*X,2*Y,2,2):r+=s.charCodeAt(i-28,x.fillStyle=&#x27;#&#x27;+(r&gt;&gt;8&amp;0xFFFFFF).toString(16)))r^=r&lt;&lt;13,r^=r&gt;&gt;&gt;17,r^=r&lt;&lt;5,X=i&amp;3,Y=i&gt;&gt;2</code></pre>