Since the new Stack Exchange top bar apparently broke the old user script, I wrote a quick and dirty replacement for it.

The only thing my new user script does is what I felt was the most important function of the old one: it adds a new tab to the answer list that can be used to sort answers by length of the first code block:

Screenshot of new "shortest" answer tab

It does not include any of the other fancy features of the old user script, but I think it's a lot better than nothing.

The user script has been tested in Mozilla Firefox and Google Chrome. To install it, first download and install the GreaseMonkey (for Firefox) or TamperMonkey (for Chrome) extension, and then click the "install / download" button below:

Install / Download

view source / StackApps post

The script may also work in other browsers with compatible user script support, such as Safari or Opera. See here for instructions on installing user scripts on different browsers.

Edit: Since version 0.3, the script should also work if installed directly as a Chrome extension using the alternative instructions above.

Edit 2: ...and v0.4 should solve issues with direct links to answers. (Previously, re-sorting the answers could leave a completely different answer in view than the one you wanted; now, the view should automatically jump back to the target answer.)

Ps. Shameless plug: if you like this user script, you may also want to try the Stack Overflow Unofficial Patch, another user script I've written to fix various neglected bugs and inconveniences in the Stack Exchange user interface.

  • 1
    \$\begingroup\$ Pps. Also tagging this as feature-request, because it would be really awesome to have this feature built into the Stack Exchange software running this site. We can always hope... \$\endgroup\$ Jan 22, 2014 at 19:20
  • 1
    \$\begingroup\$ Ooh, this exists? I had no idea; thanks! Another useful userscript that I use is this one for showing the length of code blocks. \$\endgroup\$
    – FireFly
    Jan 23, 2014 at 17:57
  • \$\begingroup\$ @FireFly Yay, that's the one I made :P I didn't know anyone else used it. \$\endgroup\$
    – Doorknob
    Jan 24, 2014 at 13:57
  • \$\begingroup\$ I like it, but for my question, it shows a 18 char Perl solution before a 17 char Golfscript solution. What could be the reason for this? \$\endgroup\$
    – ProgramFOX
    Jan 24, 2014 at 16:32
  • \$\begingroup\$ @ProgramFOX: ...because the Perl solution is actually also 17 chars? \$\endgroup\$ Jan 24, 2014 at 16:43
  • \$\begingroup\$ @IlmariKaronen: Thanks! I actually thought that the userscript would look at the character count included in the header of the answer. \$\endgroup\$
    – ProgramFOX
    Jan 24, 2014 at 16:44
  • \$\begingroup\$ I like this. I like this a lot. \$\endgroup\$
    – primo
    Jun 2, 2014 at 10:50
  • \$\begingroup\$ You should make a "longest" section, too. \$\endgroup\$ Jul 29, 2016 at 23:37
  • \$\begingroup\$ I am marking this as status-deferred because implementing this into the system itself will require a lot of dev work for something mostly specific to our site, but I don't want to make this status-declined myself yet. \$\endgroup\$
    – hyper-neutrino Mod
    Jun 9, 2021 at 14:12


You must log in to answer this question.