// ==UserScript== // @name Stack Overflow - Sort By Votes // @version 1.0.0 // @description Ignores accepted answer and sorts answers by most votes // @author https://github.com/jasonandmonte // @match https://stackoverflow.com/questions/* // @grant none // ==/UserScript== (() => { const sorted = [...document.getElementById('answers').children] .filter(item => item.id.includes('answer-')) .sort((e1, e2) => e2.dataset.score - e1.dataset.score); // Add the header element to the top [document.getElementById('answers-header'), ...sorted].forEach((elm) => { document.getElementById('answers').appendChild(elm) }) })();