feat: email obfuscation (#2711)

This commit is contained in:
ZhenShuo Leo committed 2026-02-25 23:13:16 +08:00
1 parent f18c6a0564
commit 55f2f22849
8 files changed
+67 -34

No files matched your search

+12
View File
@@ -0,0 +1,12 @@
(function () {
const links = document.querySelectorAll(".email-link");
links.forEach((link) => {
const email = atob(link.getAttribute("data-email"));
const subject = link.getAttribute("data-subject");
let mailto = "mailto:" + email;
if (subject) {
mailto += "?subject=" + encodeURIComponent(subject);
}
link.href = mailto;
});
})();