Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 158 Stack Exchange communities.

What is meta?
Here's how it works:
  1. Any Stack Exchange user can ask a question
  2. The community provides support, votes on ideas, and reports bugs
  3. Your voice helps shape the way Stack Exchange operates

After finding and reading How do I audit my reputation? I thought it would be a good idea to write some JavaScript that makes the response from a little bit more readable and useful.

Here's what I came up with for Opera's UserJS:

// ==UserScript==
// @include http://*
// ==/UserScript==

// add useful info to the reputation output
        var html, pre, host;

        if (e.event.eventPhase != Event.CAPTURING_PHASE) return;

        pre ="pre")[0];
        html = pre.innerHTML;
        host =;

        // link the question/post id
        html = html.replace(/(\d{5,})/g, "<a href=\"http://" + host + "/questions/$1\">$1</a>");

        // explain the various status codes
        html = html.replace(/^(\s*1\s+.*$)/gm, "$1   accepted answer (to or from you)");
        html = html.replace(/^(\s*2\s+.*$)/gm, "$1   upvote (to you)");
        html = html.replace(/^(\s*3\s+.*$)/gm, "$1   downvote (to or from you)");
        html = html.replace(/^(\s*4\s+.*$)/gm, "$1   penalty for post flagged as offensive");
        html = html.replace(/^(\s*8\s+.*$)/gm, "$1   bounty grant (from you)");
        html = html.replace(/^(\s*9\s+.*$)/gm, "$1   bounty award (to you)");
        html = html.replace(/^(\s*12\s+.*$)/gm, "$1   penalty for post flagged as spam");

        // append further links to reputations +=
            "<hr>more reputation:<br>" +
            "<a href=\"\"></a><br>" +
            "<a href=\"\"></a><br>" +
            "<a href=\"\"></a><br>" +
            "<a href=\"\"></a><br>" +
            "<a href=\"\"></a><br>" +
            "<a href=\"\"></a><br>";

        pre.innerHTML = html;
    }, false);

Could anyone convert this to other browsers in case they support some client-side JavaScript?

I assume this is more of a wiki-entry than a question, but I can't create a wiki-question.

share|improve this question
This script makes certain naive assumptions, especially the regex used to match posts: /(\d{5,})/g, which will match any number in the page that has 5 or more digits. Newer SE sites have post ids starting with 1, and 10k users have reputation more than 5 digits. – Yi Jiang Jan 16 '11 at 2:02
actually, I think this might be a better fit on than here, honestly – Jeff Atwood Jan 16 '11 at 7:44
@JeffAtwood I thought StackApps is only for scripts that actually uses the API? Because this one, as far as I can tell, doesn't. – Yi Jiang Jan 16 '11 at 9:22
@yij true, I guess there's no good place for greasemonkey stuff other than here then – Jeff Atwood Jan 16 '11 at 17:45
Starting a bounty to award it to YiJiang's answer. That is such great work – Pëkka Jan 21 '11 at 10:54
up vote 7 down vote accepted

I've rewritten the script so that it works on Firefox, Chrome and Opera. It now lists all sites in the Stack Exchange network, by using the API to retrieve the list of sites. I've also updated the regex to avoid the problem I mentioned in the comments.

Stack Exchange Reputation Audit Helper

Install - Source

Edit: I've updated the parser to infer from the amount of rep changed the type of accepted answer and downvote that was given.

share|improve this answer
Whow, I didn't know there were that many related sites. Anyway, thanks for your work. There isn't really much left from my code ;). – sjngm Jan 16 '11 at 16:59
Just FYI, you may want to add askubuntu to the include list – KitsuneYMG Jan 20 '11 at 19:21
@KitsuneYMG Added, together with a few others I missed. Thanks! – Yi Jiang Jan 21 '11 at 4:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .