nixos-config/pkgs/contact-page/src/main.js

23 lines
757 B
JavaScript
Raw Normal View History

2021-06-02 13:19:15 +02:00
(() => {
const givenName = document.getElementById('name').innerText.split(" ")[0].toLowerCase()
const domain = location.host
if (domain === "sbruder.de") {
const mailAddress = givenName + '@' + domain
const mailEl = document.getElementById('email')
mailEl.innerText = mailAddress
mailEl.href = `mailto:${mailAddress}`
2021-06-02 13:19:15 +02:00
const matrixAddress = '@' + givenName + ':' + domain
const matrixEl = document.getElementById('matrix')
matrixEl.innerText = matrixAddress
matrixEl.href = `https://matrix.to/#/${matrixAddress}`
}
2021-06-02 13:19:15 +02:00
const forbiddenWordEls = Array.from(document.getElementsByClassName("forbiddenword"))
forbiddenWordEls.forEach(el => {
el.innerHTML = "blockchain"
el.classList.add("processed")
})
2021-06-02 13:19:15 +02:00
})()