Hold my beer, imma write a web extension
I'm aware some already exist, but nothing that respects the super odd anchoring system they have.
Scratch code so far is
[...document.querySelectorAll('#answers > div.answer')].reduce((acc, el) => [...acc, {anchor: el.previousElementSibling, answer: el, votes: +el.querySelector('div[itemprop="upvoteCount"]').getAttribute('data-value')}], []).sort((a, b) => b.votes - a.votes)
Top comments (0)