Added a small script to decode hexa (useful for hiding emails)
This commit is contained in:
20
dev-random/static/js/hex2ascii.js
Normal file
20
dev-random/static/js/hex2ascii.js
Normal 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','');
|
||||
}
|
||||
};
|
||||
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user