From b87d77802e9b2499c69affa20b80e1ec0f777e2a Mon Sep 17 00:00:00 2001 From: Ardis Lu Date: Mon, 22 Jul 2024 22:59:24 -0700 Subject: [PATCH] Remove unnecessary code --- index.html | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/index.html b/index.html index f2aa443..168de99 100644 --- a/index.html +++ b/index.html @@ -430,8 +430,7 @@ debounceButton(e.target, icons['permalink'], 'Copy permalink to clipboard'); }); - document.querySelector('#download-table').addEventListener('click', async e => { - const table = document.querySelector('table'); + document.querySelector('#download-table').addEventListener('click', e => { const csv = '"' + table.innerText.replaceAll('"', '""').replaceAll('\t', '","').replaceAll('\n', '"\n"') + '"'; const file = new File([csv], `Event_Hashes_${Date.now()}`, { type: 'text/csv' }); const a = document.createElement('a'); @@ -441,8 +440,7 @@ debounceButton(e.target, icons['download'], 'Download table to CSV'); }); - document.querySelector('#copy-table').addEventListener('click', async e => { - const table = document.querySelector('table'); + document.querySelector('#copy-table').addEventListener('click', e => { if (window.ClipboardItem === undefined) { navigator.clipboard.writeText(table.innerText); } -- 2.47.3