Skip to content

Instantly share code, notes, and snippets.

@vanpariyar
Last active March 6, 2020 07:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vanpariyar/0a7be52984fa7eab37445db33446fc3e to your computer and use it in GitHub Desktop.
Save vanpariyar/0a7be52984fa7eab37445db33446fc3e to your computer and use it in GitHub Desktop.
Download all images in all pages add to console in your site.
jQuery('.galleryblock>a').each((ind , value) => {
console.log(jQuery(value).prop('href'));
var link = document.createElement('a');
link.href = jQuery(value).prop('href');
link.download = link.href.substring(link.href.lastIndexOf('/')+1);;
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment