Last active
December 12, 2016 13:39
-
-
Save vjk2005/3998677 to your computer and use it in GitHub Desktop.
Download images from 500px
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
// 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