Added a small script to decode hexa (useful for hiding emails)

This commit is contained in:
m-r-r
2012-04-22 20:43:52 +02:00
parent 7375cdade2
commit c551764f59
2 changed files with 21 additions and 0 deletions

View File

@@ -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','');
}
};

View File

@@ -14,6 +14,7 @@
title="{{ SITENAME }} — Flux RSS"
href="{{ SITEURL }}/{{ FEED_RSS }}" />
{% endif %}
<script src="{{ SITEURL }}/theme/js/hex2ascii.js"></script>
<!--[if lte IE 8]><script src="{{ SITEURL }}/theme/js/html5shiv.js"></script><![endif]-->
{% if GOOGLE_ANALYTICS %}
<script type="text/javascript">