Skip to content

Instantly share code, notes, and snippets.

@saleehk
Created June 16, 2016 05:21
Show Gist options
  • Save saleehk/c19eea2ca9b54931e5ef5c2bef07191f to your computer and use it in GitHub Desktop.
Save saleehk/c19eea2ca9b54931e5ef5c2bef07191f to your computer and use it in GitHub Desktop.
Download images using chrome
$(".download").each(function () {
url = ($(this).attr("href"));
var a = document.createElement('a');
a.href = url;
a.download = "favicon.png";
document.body.appendChild(a);
a.click();
document.body.removeChild(a);
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment