Download file, button groups, fix unknown file reading (#84)

This commit is contained in:
Thomas Miceli
2023-07-26 15:43:07 +02:00
committed by GitHub
parent 89685bfac6
commit b5cd49db4c
5 changed files with 58 additions and 9 deletions

View File

@ -178,7 +178,7 @@ document.addEventListener('DOMContentLoaded', () => {
document.querySelectorAll('.copy-gist-btn').forEach((e: HTMLElement) => {
e.onclick = () => {
navigator.clipboard.writeText(e.parentNode!.querySelector<HTMLElement>('.gist-content')!.textContent || '').catch((err) => {
navigator.clipboard.writeText(e.parentNode!.parentNode!.querySelector<HTMLElement>('.gist-content')!.textContent || '').catch((err) => {
console.error('Could not copy text: ', err);
});
};