Skip to content

Instantly share code, notes, and snippets.

@vjk2005
Last active December 12, 2016 13:39
Show Gist options
  • Save vjk2005/3998677 to your computer and use it in GitHub Desktop.
Save vjk2005/3998677 to your computer and use it in GitHub Desktop.
Download images from 500px
// Bookmarklet
javascript:(function() {
var a = document.createElement('a'), img_src = document.getElementsByClassName( 'the_photo' )[0].src;
a.href = img_src;
a.download = document.getElementsByClassName('name')[0].innerText + ' by ' + document.getElementsByClassName('author_name')[0].innerText + '.' + img_src.split('.').pop();
document.body.appendChild(a);
a.click();
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment