Last active
December 19, 2023 04:02
-
-
Save yask123/49b71bfb525300f84422 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
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