obfuscate email a bit

This commit is contained in:
Ville Lindholm 2024-10-04 10:38:00 +03:00
parent fb0073d34d
commit 9664764db5
No known key found for this signature in database

View File

@ -31,12 +31,19 @@
<!-- a naive email obfuscator to counteract scrapers --> <!-- a naive email obfuscator to counteract scrapers -->
<script> <script>
window.addEventListener('DOMContentLoaded', function () { window.addEventListener('DOMContentLoaded', function () {
let first = 'ville';
let at = '@';
let last = 'lindholm';
document.querySelectorAll('span#lindholm-email').forEach(function (span) { document.querySelectorAll('span#lindholm-email').forEach(function (span) {
span.innerHTML = `${first}${at}${last}.dev`; span.innerHTML = "Rendering email...";
span.setAttribute('aria-busy', 'true');
}); });
setTimeout(function () {
let first = 'ville';
let at = '@';
let last = 'lindholm';
document.querySelectorAll('span#lindholm-email').forEach(function (span) {
span.innerHTML = `${first}${at}${last}.dev`;
span.removeAttribute('aria-busy');
});
}, 2000);
}); });
</script> </script>
</head> </head>
@ -50,7 +57,9 @@
</li> </li>
</ul> </ul>
<ul> <ul>
<li><a href="/cv" class="contrast">CV</a></li> <li><a href="/cv">
<h5>CV</h5>
</a></li>
<!-- <li><a href="/blog" class="contrast">Blog</a></li> --> <!-- <li><a href="/blog" class="contrast">Blog</a></li> -->
</ul> </ul>
</nav> </nav>