fix curly-braces in template
This commit is contained in:
parent
f2d8f25565
commit
09dd5db5b8
@ -23,7 +23,7 @@
|
||||
</head>
|
||||
|
||||
<script>
|
||||
function fixEmails() {
|
||||
function fixEmails() {{
|
||||
const mailtoArray = [
|
||||
'm', 'a', 'i', 'l', 't', 'o', ':',
|
||||
'c', 'o', 'l', 'i', 'n', '@',
|
||||
@ -31,16 +31,16 @@ function fixEmails() {
|
||||
'.', 'd', 'e', 'v'];
|
||||
const mailtoLink = mailtoArray.join('');
|
||||
const anchors = document.getElementsByTagName('a');
|
||||
for (let i = 0; i < anchors.length; i++) {
|
||||
for (let i = 0; i < anchors.length; i++) {{
|
||||
const anchor = anchors[i];
|
||||
if (anchor.href == 'mailto:email@example.com') {
|
||||
if (anchor.href == 'mailto:email@example.com') {{
|
||||
anchor.href = mailtoLink;
|
||||
if (anchor.innerText == 'colin at mcmillen dot dev') {
|
||||
if (anchor.innerText == 'colin at mcmillen dot dev') {{
|
||||
anchor.innerText = mailtoLink.substring(7);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}}
|
||||
}}
|
||||
}}
|
||||
}}
|
||||
</script>
|
||||
|
||||
<body onload="fixEmails()">
|
||||
|
Loading…
Reference in New Issue
Block a user