MAKE. THIS. PERMANENT!
On the functional side, this really helps you see who is who in a long threaded discussion. Your eye is much quicker at following the little color icons than their names.
MAKE. THIS. PERMANENT!
On the functional side, this really helps you see who is who in a long threaded discussion. Your eye is much quicker at following the little color icons than their names.
I think it's a skeleton holding his arms up!
edit: Looks like I'm some green bug-monster
I second this. (Also I wanted to see what my avatar looks like, sry)
(function() { // Initial concept is from: https://news.ycombinator.com/item?id=30668137 (tomxor) // The script we are using is from: https://news.ycombinator.com/item?id=30670079 (onion2k) 'use strict'; let observer = new IntersectionObserver( (entries) => { entries.forEach((entry, i) => { if (entry.isIntersecting) { const p = 2; const c = document.createElement('canvas'); const x = c.getContext('2d'); c.width = 18; c.height = 14; const s = entry.target.innerText; const r = 1;
if (s) {
for (
let s = entry.target.innerText, r = 1, i = 28 + s.length;
i--;
) {
// xorshift32
(r ^= r << 13), (r ^= r >>> 17), (r ^= r << 5);
const X = i & 3,
Y = i >> 2;
if (i >= 28) {
// seed state
r += s.charCodeAt(i - 28);
x.fillStyle =
'#' + ((r >> 8) & 0xffffff).toString(16).padStart(0, 6);
} else {
// draw pixel
if (r >>> 29 > (X * X) / 3 + Y / 2)
x.fillRect(p * 3 + p * X, p * Y, p, p),
x.fillRect(p * 3 - p * X, p * Y, p, p);
}
}
}
entry.target.prepend(c);
} else {
if (entry.target.firstChild.tagName === 'CANVAS')
entry.target.firstChild.remove();
}
});
},
{ rootMargin: '0px 0px 0px 0px' }
);
document.querySelectorAll('.hnuser').forEach((user) => {
observer.observe(user);
});
})();also i wanted to see mine too
Unique, fixed little color doodads make it easier to see who's who in a thread.
Edit: Huh, I got an alien house. Reminds me of some game.
// ==UserScript==
// @name HN Avatars in 357 bytes
// @description Annotated avatars on all HN comments.
// @author tomxor (https://news.ycombinator.com/user?id=tomxor)
// @namespace https://news.ycombinator.com/item?id=30668137
// @include https://news.ycombinator.com/item*
// @include https://news.ycombinator.com/user*
// @grant none
// @version 1.0.0
// ==/UserScript==
[js goes here]edit: ooo, i'm a...green house?
edit: oh that was unexpected
edit: A bell? A thicc rocket..? Neat.
[1]: https://i.pinimg.com/736x/2b/e7/cb/2be7cb420de47ac68e1345f4a...