Created
July 20, 2021 20:28
-
-
Save 0xd61/1a84cde1899003654d160502cc41ce1d to your computer and use it in GitHub Desktop.
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
// grab the URLs | |
var urls = $('.tile--img__img').map(function(idx, el) { return el.src}); | |
// write the URls to file (one per line) | |
var textToSave = urls.toArray().join('\n'); | |
var hiddenElement = document.createElement('a'); | |
hiddenElement.href = 'data:attachment/text,' + encodeURI(textToSave); | |
hiddenElement.target = '_blank'; | |
hiddenElement.download = 'urls.txt'; | |
hiddenElement.click(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment