feat(footer/socials): add base64 encoded email protection

This commit is contained in:
welpo
2023-08-18 18:39:24 +02:00
parent 68e37f4574
commit 427ffc7241
7 changed files with 119 additions and 6 deletions

1
static/js/decodeMail.min.js vendored Normal file
View File

@@ -0,0 +1 @@
!function(){"use strict";document.querySelectorAll("[data-encoded-email]").forEach(function(e){var t=function(e){try{var t=[...atob(e)].map(e=>e.charCodeAt(0)),r=new Uint8Array(t.length);return r.set(t),new TextDecoder("utf-8").decode(r)}catch(e){return console.error("Failed to decode Base64 string: ",e),null}}(e.getAttribute("data-encoded-email"));t?e.setAttribute("href","mailto:"+t):e.style.display="none"})}();