Skip to main content
added attribution to comply with license agreement
Source Link

HTTPS support, changes your own rep in the top bar as well.

Great script btw :PD

// ==UserScript==
// @name           hex stack overflow rep
// @namespace      stackoverflow
// @description    Displays user's rep in hexadecimal on stack overflow
// @include       http*://*stackoverflow.com/*
// @include       http*://*superuser.com/*
// @include       http*://*serverfault.com/*
// @include       http*://*askubuntu.com/*
// @include       http*://*.stackexchange.com/*
// @include       http*://*stackapps.com/*
// @author         a stoneKip arachnidRobinson
// ==/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() {
    function calculate(x){
      var title = $(x).attr('title'),
      text = $(x).text(),
      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, '')));
      }

      $(x).text('0x' + rep.toString(16).toUpperCase()).attr('title',rep);
    }
    $('.-rep').each(function() {
      calculate(this);
    });
    $('.reputation-score').each(function() {
      calculate(this);
    });
  });

}();

HTTPS support, changes your own rep in the top bar as well.

Great script :P

// ==UserScript==
// @name           hex stack overflow rep
// @namespace      stackoverflow
// @description    Displays user's rep in hexadecimal on stack overflow
// @include       http*://*stackoverflow.com/*
// @include       http*://*superuser.com/*
// @include       http*://*serverfault.com/*
// @include       http*://*askubuntu.com/*
// @include       http*://*.stackexchange.com/*
// @include       http*://*stackapps.com/*
// @author         a stone arachnid
// ==/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() {
    function calculate(x){
      var title = $(x).attr('title'),
      text = $(x).text(),
      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, '')));
      }

      $(x).text('0x' + rep.toString(16).toUpperCase()).attr('title',rep);
    }
    $('.-rep').each(function() {
      calculate(this);
    });
    $('.reputation-score').each(function() {
      calculate(this);
    });
  });

}();

HTTPS support, changes your own rep in the top bar as well.

Great script btw :D

// ==UserScript==
// @name           hex stack overflow rep
// @namespace      stackoverflow
// @description    Displays user's rep in hexadecimal on stack overflow
// @include       http*://*stackoverflow.com/*
// @include       http*://*superuser.com/*
// @include       http*://*serverfault.com/*
// @include       http*://*askubuntu.com/*
// @include       http*://*.stackexchange.com/*
// @include       http*://*stackapps.com/*
// @author         Kip Robinson
// ==/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() {
    function calculate(x){
      var title = $(x).attr('title'),
      text = $(x).text(),
      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, '')));
      }

      $(x).text('0x' + rep.toString(16).toUpperCase()).attr('title',rep);
    }
    $('.-rep').each(function() {
      calculate(this);
    });
    $('.reputation-score').each(function() {
      calculate(this);
    });
  });

}();
Source Link

HTTPS support, changes your own rep in the top bar as well.

Great script :P

// ==UserScript==
// @name           hex stack overflow rep
// @namespace      stackoverflow
// @description    Displays user's rep in hexadecimal on stack overflow
// @include       http*://*stackoverflow.com/*
// @include       http*://*superuser.com/*
// @include       http*://*serverfault.com/*
// @include       http*://*askubuntu.com/*
// @include       http*://*.stackexchange.com/*
// @include       http*://*stackapps.com/*
// @author         a stone arachnid
// ==/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() {
    function calculate(x){
      var title = $(x).attr('title'),
      text = $(x).text(),
      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, '')));
      }

      $(x).text('0x' + rep.toString(16).toUpperCase()).attr('title',rep);
    }
    $('.-rep').each(function() {
      calculate(this);
    });
    $('.reputation-score').each(function() {
      calculate(this);
    });
  });

}();