What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 130 Stack Exchange communities.

The count of helpful flags on the user profile page doesn't use a thousand separator. There are other areas like that, I know, but this one stands out much more as it's right next to the profile views count which uses the separator.

enter image description here

I know this is small but I guess won't be hard to change.

share|improve this question
4  
  is the one true thousands seperator! U+2009 2014. –  minitech Mar 2 at 23:31

1 Answer 1

I've added a client-side fix for this issue into the Stack Overflow Unofficial Patch v1.10. Alas, I have not been able to test it fully under "natural" conditions, since I don't actually have a four-digit helpful flag count on any SE site, but it does work as expected if I kluge it to artificially inflate the count.

In case you're curious, here's the code:

var links = $('body.user-page #user-info-container a[href^="/users/flag-summary/"]');
SOUP.forEachTextNode( links, function () {
    this.nodeValue = this.nodeValue.replace( /[0-9]{4,}/g, function (digits) {
        return Number( digits ).toLocaleString( 'en-US' );
    } );
} );

Note that, since the fix is based on Number.toLocaleString(), some older browsers might format the number according to the user's selected locale. All officially supported browsers should respect the explicit en-US locale I'm specifying, though.

Edit: It seems the original fix caused some minor formatting breakage for moderators. SOUP v1.10.2 uses the updated code above, which should be more tolerant of the link(s) containing more than just a simple number. Thanks to Monica Cellio for reporting this issue!

share|improve this answer

You must log in to answer this question.

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