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\$ – Ilmari Karonen Jan 22 '14 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 '14 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 '14 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 '14 at 16:32
  • \$\begingroup\$ @ProgramFOX: ...because the Perl solution is actually also 17 chars? \$\endgroup\$ – Ilmari Karonen Jan 24 '14 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 '14 at 16:44
  • \$\begingroup\$ I like this. I like this a lot. \$\endgroup\$ – primo Jun 2 '14 at 10:50
  • \$\begingroup\$ You should make a "longest" section, too. \$\endgroup\$ – haykam Jul 29 '16 at 23:37

You must log in to answer this question.

Browse other questions tagged .