This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 1. View: Full View | |
// 2. Scroll to bottom of page until all entries are lazy-loaded. | |
function downloadCSV(content) { | |
let filename = 'CR_' + (new Date()).toISOString().replaceAll(/[T:.]/g, '_') + '.csv'; | |
let a = document.createElement('a'); | |
a.download = filename; | |
a.href = 'data:text/csv,' + content; // TODO: %-encode | |
a.click(); | |
} |