Last active
December 17, 2015 15:08
-
-
Save jmdeldin/5629076 to your computer and use it in GitHub Desktop.
Create a bookmark called "Sort Honeybadger" (or something), paste the contents of compressed.js into the location, then run this on one of the Honeybadger error pages.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function()%7Bvar table%3D%24(%27.faults%27)%3Bvar f%3Dfunction(tr)%7Breturn parseInt(%24(tr).find(%27.count%27).text().trim())%3B%7D%3Bvar thead%3Dtable.find(%27tr:first%27)%3Bthead.remove()%3Btable.html(table.find(%27tr%27).sort(function(x,y)%7Breturn f(x)<f(y)%3F1:f(x)>f(y)%3F-1:0%3B%7D))%3Btable.prepend(thead)%3B%7D)()%3B |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var table = $('.faults'); | |
var f = function (tr) { return parseInt($(tr).find('.count').text().trim()); }; | |
var thead = table.find('tr:first'); | |
thead.remove(); | |
table.html(table.find('tr').sort(function (x, y) { | |
return f(x) > f(y) ? 1 : | |
f(x) < f(y) ? -1 : 0; | |
})); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment