diff options
author | Dante Catalfamo | 2020-11-06 10:24:15 -0500 |
---|---|---|
committer | Dante Catalfamo | 2020-11-06 10:24:15 -0500 |
commit | 675ff57c2e1959070ccf0260a74f080f6fb6d383 (patch) | |
tree | 350ba1c58bce84d31a14867e6bd4311a10c7f3db /content/about | |
parent | 0b10d85d9099348c8859765e21b0948167df011b (diff) | |
download | blog-675ff57c2e1959070ccf0260a74f080f6fb6d383.tar.gz blog-675ff57c2e1959070ccf0260a74f080f6fb6d383.tar.bz2 blog-675ff57c2e1959070ccf0260a74f080f6fb6d383.zip |
About: Email decode script
Diffstat (limited to 'content/about')
-rw-r--r-- | content/about/email.js | 12 | ||||
-rw-r--r-- | content/about/index.org | 9 |
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]] |