const copy = document.querySelector(".content-header__server-name"); copy.onclick = function() { document.execCommand("copy"); }