Obfuscate email address
This commit is contained in:
parent
7b6d7d86db
commit
2d04a7b4d7
1 changed files with 21 additions and 2 deletions
23
index.html
23
index.html
|
|
@ -16,10 +16,29 @@
|
|||
<p>
|
||||
<strong>Hello.</strong> Thanks for dropping by. There’s not much to see here at the moment, but feel free to drop me a line using one of the links below.
|
||||
</p>
|
||||
<ul class="contact">
|
||||
<ul id="contact" class="contact">
|
||||
<li><a class="fa fa-github" href="https://github.com/caesar">GitHub</a></li>
|
||||
<li><a class="fa fa-twitter" href="https://twitter.com/caesarschinas">Twitter</a></li>
|
||||
<li><a class="fa fa-envelope" href="mailto:caesar@caesarschinas.com">email</a></li>
|
||||
</ul>
|
||||
<script>
|
||||
(function(){
|
||||
if (!('addEventListener' in window && 'createElement' in document)) return;
|
||||
|
||||
var a = document.createElement('a');
|
||||
a.text = 'email';
|
||||
a.className = 'fa fa-envelope';
|
||||
function setHref(e) {
|
||||
var x = 'pnrfne' + '@pnrfnefpuvanf' + '.pbz';
|
||||
x = x.replace(/[a-zA-Z]/g, function(c){return String.fromCharCode((c<="Z"?90:122)>=(c=c.charCodeAt(0)+13)?c:c-26);});
|
||||
this.href = 'mailto:' + x;
|
||||
this.removeEventListener('mouseover', setHref);
|
||||
}
|
||||
a.addEventListener('mouseover', setHref, false);
|
||||
|
||||
var li = document.createElement('li');
|
||||
li.appendChild(a);
|
||||
document.getElementById('contact').appendChild(li);
|
||||
})();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
Loading…
Reference in a new issue