mirror of
https://github.com/welpo/tabi.git
synced 2025-10-11 07:46:15 +02:00
✨ feat(footer/socials): add base64 encoded email protection
This commit is contained in:
parent
68e37f4574
commit
427ffc7241
7 changed files with 119 additions and 6 deletions
1
static/js/decodeMail.min.js
vendored
Normal file
1
static/js/decodeMail.min.js
vendored
Normal 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"})}();
|
Loading…
Add table
Add a link
Reference in a new issue