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