]> BookStack Code Mirror - website/blobdiff - themes/bookstack/static/js/script.js
Updated sponsors, Added sponsor terms info to donate page
[website] / themes / bookstack / static / js / script.js
index 8fe5d0fb4438c2c4c6499ab36cae76fcb79db7e7..1cc52bbc1286c2f39df021856f8bbcd19d4b72ee 100644 (file)
@@ -176,4 +176,17 @@ searchInput.addEventListener('input', event => {
     showSearchLoading();
     runSearch();
   }
-})
\ No newline at end of file
+});
+
+
+// Email display
+const emailDisplayLinks = document.querySelectorAll('a.email-display');
+const eb64 = 'ZW1haWxAYm9v' + 'a3N0YWNrYXBwLmNvbQ==';
+for (const link of emailDisplayLinks) {
+  const email = atob(eb64);
+  link.addEventListener('click', e => {
+    e.preventDefault();
+    e.target.textContent = email;
+    e.target.href = 'mailto:' + email;
+  });
+}
\ No newline at end of file