Take the 2-minute tour ×
Stack Apps is a question and answer site for apps, scripts, and development with the Stack Exchange API. It's 100% free, no registration required.

Screenshot / Code Snippet

enter image description here

About

Displays user reputation in hexadecimal. The code is quite simple if you want to do any tweaks. For users with rep >= 0x10000, it switches the font to Arial Narrow to prevent breaking layouts.

Download

Install | View source

Platform

Tested on Firefox 4.0 and Chrome 10.0, on Windows 7. Requires Greasemonkey on Firefox.

License

Do whatever you want, as long as you don't sell it or claim you wrote it. If you make any cool modifications, let me know!

Source

It seems that userscripts.org is dying. Here is the code:

// ==UserScript==
// @name           hex stack overflow rep
// @namespace      stackoverflow
// @description    Displays user's rep in hexadecimal on stack overflow
// @include       http://stackoverflow.com/*
// @include       http://meta.stackoverflow.com/*
// @include       http://superuser.com/*
// @include       http://meta.superuser.com/*
// @include       http://serverfault.com/*
// @include       http://meta.serverfault.com/*
// @include       http://askubuntu.com/*
// @include       http://meta.askubuntu.com/*
// @include       http://answers.onstartups.com/*
// @include       http://meta.answers.onstartups.com/*
// @include       http://nothingtoinstall.com/*
// @include       http://meta.nothingtoinstall.com/*
// @include       http://seasonedadvice.com/*
// @include       http://meta.seasonedadvice.com/*
// @include       http://crossvalidated.com/*
// @include       http://askdifferent.com/*
// @include       http://meta.crossvalidated.com/*
// @include       http://stackapps.com/*
// @include       http://*.stackexchange.com/*
// @exclude       http://chat.stackexchange.com/*
// @exclude       http://api.*.stackexchange.com/*
// @exclude       http://data.stackexchange.com/*
// @exclude       http://area51.stackexchange.com/*
// @author         Kip Robinson - http://stackoverflow.com/users/18511/kip
// ==/UserScript==

(function() {
   function with_jquery(f) {
    var script = document.createElement("script");
    script.type = "text/javascript";
    script.textContent = "(" + f.toString() + ")(jQuery)";
    document.body.appendChild(script);
  }; 

  with_jquery(function($)
  {
    $('.reputation-score').each(function() {
      var title = $(this).attr('title');
      var text = $(this).text();
      var rep = 1;

      if(text.indexOf('k') < 0)
      {
        rep = parseInt(text.replace(/,/g, ''));
      }
      else
      {
        rep = parseInt(title.replace(/\D/g, ''));

        //if no rep was in the tooltip, convert the truncated rep to hex
        if(isNaN(rep))
          rep = Math.round(1000 * parseFloat(text.replace(/[k,]/gi, '')));
      }

      $(this).text('x' + rep.toString(16).toUpperCase());
      if(rep >= 0x10000)
        $(this).css('font-family', 'Arial Narrow,' + $(this).css('font-family'));
    });
  });

})();
share|improve this question
14  
useless AND I LOVE IT! –  Jeff Atwood Apr 13 '11 at 20:06
    
I believe "useless" would be an understatement, but like many useless things, it's quite humorous. :) –  muntoo Sep 2 '11 at 0:40
1  
@Kip See Octal user reputation, a derivative of this script. –  ctype.h Mar 6 '13 at 23:30

2 Answers 2

Nice script! I modified your script slightly to obtain a script that does not show exact reputation but just category of the user. It can easily be modified to show symbols in place of the numbers:

// ==UserScript==
// @name           hex stack overflow rep
// @namespace      stackoverflow
// @description    Displays user's rep in hexadecimal on stack overflow
// @include       http://stackoverflow.com/*
// @include       http://meta.stackoverflow.com/*
// @include       http://superuser.com/*
// @include       http://meta.superuser.com/*
// @include       http://serverfault.com/*
// @include       http://meta.serverfault.com/*
// @include       http://askubuntu.com/*
// @include       http://meta.askubuntu.com/*
// @include       http://answers.onstartups.com/*
// @include       http://meta.answers.onstartups.com/*
// @include       http://nothingtoinstall.com/*
// @include       http://meta.nothingtoinstall.com/*
// @include       http://seasonedadvice.com/*
// @include       http://meta.seasonedadvice.com/*
// @include       http://crossvalidated.com/*
// @include       http://askdifferent.com/*
// @include       http://meta.crossvalidated.com/*
// @include       http://stackapps.com/*
// @include       http://*.stackexchange.com/*
// @exclude       http://chat.stackexchange.com/*
// @exclude       http://api.*.stackexchange.com/*
// @exclude       http://data.stackexchange.com/*
// @exclude       http://area51.stackexchange.com/*
// @author         Kip Robinson - http://stackoverflow.com/users/18511/kip
// ==/UserScript==

(function() {
  function with_jquery(f) {
    var script = document.createElement("script");
    script.type = "text/javascript";
    script.textContent = "(" + f.toString() + ")(jQuery)";
    document.body.appendChild(script);
  }; 

  with_jquery(function($) {
    $('.reputation-score').each(function() {
      var title = $(this).attr('title');
      var text = $(this).text();
      var rep = 1;

      if(text.indexOf('k') < 0) {
        rep = parseInt(text.replace(/,/g, ''));
      } else {
        rep = parseInt(title.replace(/\D/g, ''));

        //if no rep was in the tooltip, convert the truncated rep to hex
        if(isNaN(rep))
          rep = Math.round(1000 * parseFloat(text.replace(/[k,]/gi, '')));
      }

      if(rep >= 20000) $(this).text('20K+');       // 'Trusted'
      else if(rep >= 10000) $(this).text('10K+');  // 'Moderator'
      else if(rep >= 3000) $(this).text('3K+');    // 'Scope Definer' 'Closer'
      else if(rep >= 2000) $(this).text('2K+');    // 'Editor'
      else if(rep >= 1000) $(this).text('1K+');    // 'Expert'
      else if(rep >= 500) $(this).text('500+');    // 'Retagger'
      else if(rep >= 200) $(this).text('200+');    // 'Contributer'
      else if(rep >= 50) $(this).text('50+');      // 'Commentator'
      else if(rep >= 15) $(this).text('15+');      // 'Voter'
      else $(this).text('!');                      // 'New'

//    if(rep >= 0x10000)
//      $(this).css('font-family', 'Arial Narrow,' + $(this).css('font-family'));
    });
  });

})()
share|improve this answer

Here is another one which hides vote counts and only shows range:


// ==UserScript==
// @name           se symb votes
// @namespace      stackoverflow
// @description    Displays vote counts symbolicly on SE network
// @include       http://stackoverflow.com/*
// @include       http://meta.stackoverflow.com/*
// @include       http://superuser.com/*
// @include       http://meta.superuser.com/*
// @include       http://serverfault.com/*
// @include       http://meta.serverfault.com/*
// @include       http://askubuntu.com/*
// @include       http://meta.askubuntu.com/*
// @include       http://answers.onstartups.com/*
// @include       http://meta.answers.onstartups.com/*
// @include       http://nothingtoinstall.com/*
// @include       http://meta.nothingtoinstall.com/*
// @include       http://seasonedadvice.com/*
// @include       http://meta.seasonedadvice.com/*
// @include       http://crossvalidated.com/*
// @include       http://askdifferent.com/*
// @include       http://meta.crossvalidated.com/*
// @include       http://stackapps.com/*
// @include       http://*.stackexchange.com/*
// @exclude       http://chat.stackexchange.com/*
// @exclude       http://api.*.stackexchange.com/*
// @exclude       http://data.stackexchange.com/*
// @exclude       http://area51.stackexchange.com/*
// @author          
// ==/UserScript==

(function() {
  function with_jquery(f) {
    var script = document.createElement("script");
    script.type = "text/javascript";
    script.textContent = "(" + f.toString() + ")(jQuery)";
    document.body.appendChild(script);
  }; 

  with_jquery(function($) {
    $('.vote-count-post').each(function() {
      var title = $(this).attr('title');
      var text = $(this).text();
      var vote = 0;

      if(text.indexOf('k') < 0) {
        vote = parseInt(text.replace(/,/g, ''));
      } else {
        vote = parseInt(title.replace(/\D/g, ''));

    //if no vote was in the tooltip, convert the truncated vote to hex
        if(isNaN(vote))
          vote = Math.round(1000 * parseFloat(text.replace(/[k,]/gi, '')));
      }

      if(vote >= 100) $(this).text('100+');      
      else if(vote >= 25) $(this).text('25+'); 
      else if(vote >= 10) $(this).text('10+');  
      else if(vote >= 1)  $(this).text('+');  
      else if(vote >= 0)  $(this).text('0');
      else $(this).text('-');

    });
  });

})()
share|improve this answer

You must log in to answer this question.

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