When you so done with Stackoverflow sorting accepted answers wrong
Jay Wick
Posted on September 3, 2019
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)
💖 💪 🙅 🚩
Jay Wick
Posted on September 3, 2019
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.
Related
watercooler Why does a reboot make your PC run SO much faster than running all the cleaning tools you can possibly imagine?
November 30, 2024