4 ms·
Not minimized but generates a file 'emails.txt': a = document.createElement('a'); a.download = 'emails.txt'; a.href = `data:text/plain,${Array.from(document.
by nawgszy 7y ago
Not minimized but generates a file 'emails.txt':
a = document.createElement('a');
a.download = 'emails.txt';
a.href = `data:text/plain,${Array.from(document.querySelectorAll('a')).map(a => a.href).filter(s => ~s.indexOf('mailto')).join(',')}`;
document.body.appendChild(a);
a.click();
- sushisource 7y agoThat's a really cool trick for creating a file you can download.