30 lines
1.0 KiB
JavaScript
30 lines
1.0 KiB
JavaScript
var isCopyTimeout = false;
|
|
|
|
function contact(element) {
|
|
var address = atob("ZWxpYXM=") + atob("QGVsaWFzLW11ZWxsZXIuY29t");
|
|
window.location.href = atob("bWFpbHRv") + ":" + address;
|
|
|
|
if(!navigator.clipboard) return;
|
|
navigator.clipboard.writeText(address);
|
|
|
|
if(isCopyTimeout) return;
|
|
var previousContent = element.innerHTML;
|
|
element.innerHTML = "<i class=\"fa-solid fa-heart\"></i>E-Mail wurde kopiert!";
|
|
isCopyTimeout = true;
|
|
|
|
setTimeout(() => {
|
|
element.innerHTML = previousContent;
|
|
isCopyTimeout = false;
|
|
}, 3000)
|
|
}
|
|
|
|
var now = new Date();
|
|
document.getElementById("age").textContent = now.getFullYear() - 2003 - (now.getMonth() < 8 ? 1 : 0);
|
|
document.getElementById("linux-years").textContent = now.getFullYear() - 2017;
|
|
|
|
window.addEventListener("hashchange", () => {
|
|
if(location.hash !== "#details") document.querySelector(".card .back").scrollTop = 0;
|
|
});
|
|
|
|
requestAnimationFrame(() => requestAnimationFrame(() => document.documentElement.classList.remove("preload")));
|