Created
February 27, 2016 08:58
-
-
Save yask123/252d1734355094e79659 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
var img_dom = document.getElementsByClassName('image-thumb-body'); | |
var links = []; | |
for (var i = 0; i< img_dom.length;i++){ | |
links.push(img_dom[i].src); | |
} | |
function downloadAll(urls) { | |
var link = document.createElement('a'); | |
link.setAttribute('download', null); | |
link.style.display = 'none'; | |
document.body.appendChild(link); | |
for (var i = 0; i < urls.length; i++) { | |
link.setAttribute('href', urls[i]); | |
link.click(); | |
} | |
document.body.removeChild(link); | |
} | |
downloadAll(links); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment