function copyElem(id, r='') { navigator.clipboard.writeText( document.getElementById(id).innerText.replaceAll(r, ''), ); } function copyFile(id) { fetch(document.getElementById(id).childNodes[0].href).then(f => { f.text().then(t => { navigator.clipboard.writeText(t); }) }) }