From c551764f59df02bf7a382b262449f5fcfae4ac3b Mon Sep 17 00:00:00 2001 From: m-r-r Date: Sun, 22 Apr 2012 20:43:52 +0200 Subject: Added a small script to decode hexa (useful for hiding emails) --- dev-random/static/js/hex2ascii.js | 20 ++++++++++++++++++++ dev-random/templates/base.html | 1 + 2 files changed, 21 insertions(+) create mode 100644 dev-random/static/js/hex2ascii.js (limited to 'dev-random') diff --git a/dev-random/static/js/hex2ascii.js b/dev-random/static/js/hex2ascii.js new file mode 100644 index 0000000..3dde36f --- /dev/null +++ b/dev-random/static/js/hex2ascii.js @@ -0,0 +1,20 @@ + +window.hex2ascii = {}; +window.hex2ascii.init = function() { + var els = document.getElementsByClassName('hex'), + hex, text, + i, j, e; + + for(i=0; i < els.length; i++) { + e = els[i]; + hex = e.innerHTML.split(' '); + text = ""; + + for(j=0; j < hex.length; j++) { + text += String.fromCharCode(parseInt(hex[j], 16)); + } + + e.innerHTML = text; + e.className = e.className.replace('hex',''); + } +}; diff --git a/dev-random/templates/base.html b/dev-random/templates/base.html index 04a2faa..1edab44 100644 --- a/dev-random/templates/base.html +++ b/dev-random/templates/base.html @@ -14,6 +14,7 @@ title="{{ SITENAME }} — Flux RSS" href="{{ SITEURL }}/{{ FEED_RSS }}" /> {% endif %} + {% if GOOGLE_ANALYTICS %}