]> git.ardis.lu - event-hashes/commitdiff
Remove unnecessary code
authorArdis Lu <ardisglu@gmail.com>
Tue, 23 Jul 2024 05:59:24 +0000 (22:59 -0700)
committerArdis Lu <ardisglu@gmail.com>
Tue, 23 Jul 2024 05:59:24 +0000 (22:59 -0700)
index.html

index f2aa44331be060e9b61f7e8f7acfb5bcc3068514..168de99e4f108ddf31be3a1e6d2981f3b232222d 100644 (file)
       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');
       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);
       }
This page took 0.034308 seconds and 4 git commands to generate.