What's some really unpopular opinion you have?
What's some really unpopular opinion you have?
Most of the time when people say they have an unpopular opinion, it turns out it's actually pretty popular.
Do you have some that's really unpopular and most likely will get you downvoted?
You're viewing a single thread.
View all comments
2.2K
comments
Lemmy needs "sort by controversial" for entertainment purposes.
76 2 ReplyInspired by this, I wrote this quick function to paste in your browser console, if you're on PC:
(() => { const comments = [...document.querySelectorAll('main > div > .comments > li')]; const commentsHolder = document.querySelector('main > div > .comments'); const sorted = comments.sort((a, b) => { const upvotesA = Number(a.querySelector('.comment-bottom-btns > button:nth-child(1) > span').innerText); const downvotesA = Number(a.querySelector('.comment-bottom-btns > button:nth-child(2) > span').innerText); const upvotesB = Number(b.querySelector('.comment-bottom-btns > button:nth-child(1) > span').innerText); const downvotesB = Number(b.querySelector('.comment-bottom-btns > button:nth-child(2) > span').innerText); const ratioA = upvotesA > downvotesA ? downvotesA / upvotesA : upvotesA / downvotesA; const ratioB = upvotesB > downvotesB ? downvotesB / upvotesB : upvotesB / downvotesB; const diffA = 1 - ratioA; const diffB = 1 - ratioB; if (diffA === diffB) { return upvotesA + downvotesA >= upvotesB + downvotesB ? -1 : 1; } return diffA > diffB ? 1 : -1; }); for (const comment of sorted) { commentsHolder.appendChild(comment); } })()
It sorts the comments by controversial, but first you need to scroll through all the comments to load them all.
20 0 ReplyI tried to sort by controversial in this thread and came to this conclusion
3 0 ReplyIndeed!
2 1 Reply
You've viewed 2223 comments.
Scroll to top