diff options
author | m-r-r <raybaudroigm@gmail.com> | 2012-04-22 20:43:52 +0200 |
---|---|---|
committer | m-r-r <raybaudroigm@gmail.com> | 2012-04-22 20:43:52 +0200 |
commit | c551764f59df02bf7a382b262449f5fcfae4ac3b (patch) | |
tree | 66b028e9987a441cff0473a442b7b28f7aa5b93a /dev-random/static | |
parent | 7375cdade23181aabe864e56a3facd892ed5892a (diff) | |
download | pelican-themes-c551764f59df02bf7a382b262449f5fcfae4ac3b.tar.gz |
Added a small script to decode hexa (useful for hiding emails)
Diffstat (limited to 'dev-random/static')
-rw-r--r-- | dev-random/static/js/hex2ascii.js | 20 |
1 files changed, 20 insertions, 0 deletions
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',''); + } +}; |