18 lines
564 B
HTML
Executable File
18 lines
564 B
HTML
Executable File
{{ $email := . }}
|
|
<span class="email"><b>{{ i18n "javascript" }}</b></span>
|
|
<script>
|
|
(function() {
|
|
var email = "{{ $email }}";
|
|
var user = email.split('@')[0];
|
|
var domain = email.split('@')[1];
|
|
var link = document.createElement('a');
|
|
link.href = 'mailto:' + user + '@' + domain;
|
|
link.textContent = user + '@' + domain;
|
|
|
|
// Replace the placeholder text with the actual link
|
|
var span = document.currentScript.previousElementSibling;
|
|
span.textContent = ""; // clear the fallback text
|
|
span.appendChild(link);
|
|
})();
|
|
</script>
|