summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
Diffstat (limited to 'content')
-rw-r--r--content/about/email.js12
-rw-r--r--content/about/index.org9
2 files changed, 20 insertions, 1 deletions
diff --git a/content/about/email.js b/content/about/email.js
new file mode 100644
index 0000000..02f3cee
--- /dev/null
+++ b/content/about/email.js
@@ -0,0 +1,12 @@
+"use strict";
+
+function emailDecode() {
+ const emailElement = document.querySelector("code.language-shell");
+ const emailB64 = emailElement.textContent.split('"')[1];
+ const email = atob(emailB64);
+ const mailto = `<a href="mailto:${email}">${email}</a>`;
+ emailElement.outerHTML = mailto;
+}
+
+const emailElement = document.querySelector("code.language-shell");
+emailElement.addEventListener('click', emailDecode);
diff --git a/content/about/index.org b/content/about/index.org
index 57d2cbe..35d0bef 100644
--- a/content/about/index.org
+++ b/content/about/index.org
@@ -40,7 +40,10 @@ I've solved after not being able to find adequate solutions online. I
figure I'm not the only one who has these problems, so I thought I'd
share my notes online!
-Unless you're a spammer, feel free to contact me at
+Unless you're a spammer, feel free to contact me.
+
+Clicking the code below will automatically decode the address in your
+browser.
#+BEGIN_SRC shell
echo "ZGFudGVAbGFtYmRhLmN4Cg==" | openssl base64 -d
@@ -48,6 +51,10 @@ echo "ZGFudGVAbGFtYmRhLmN4Cg==" | openssl base64 -d
It's always fun to hear from people!
+#+begin_export html
+<script src="email.js"></script>
+#+end_export
+
#+ATTR_HTML: :title Me Playing A Quick Game Of 9x9 Go
#+ATTR_HTML: :alt Me Playing A Quick Game Of 9x9 Go
[[file:cover.jpg]]