19 lines
558 B
JavaScript
19 lines
558 B
JavaScript
|
(() => {
|
||
|
const givenName = document.getElementById('name').innerText.split(" ")[0].toLowerCase()
|
||
|
const domain = location.host
|
||
|
|
||
|
if (domain !== "sbruder.de") {
|
||
|
return
|
||
|
}
|
||
|
|
||
|
const mailAddress = givenName + '@' + domain
|
||
|
const mailEl = document.getElementById('email')
|
||
|
mailEl.innerText = mailAddress
|
||
|
mailEl.href = `mailto:${mailAddress}`
|
||
|
|
||
|
const matrixAddress = '@' + givenName + ':' + domain
|
||
|
const matrixEl = document.getElementById('matrix')
|
||
|
matrixEl.innerText = matrixAddress
|
||
|
matrixEl.href = `https://matrix.to/#/${matrixAddress}`
|
||
|
})()
|