Last active
August 29, 2015 14:00
-
-
Save Znarkus/30007a6af394335b492c to your computer and use it in GitHub Desktop.
Instagram Photo Downloader Bookmarklet
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
//location = $('.iMedia div').css('background-image').match(/url\(['"]*(.+)['"]*\)/)[1] | |
$('<a>', { | |
href: $('.iMedia div').css('background-image').match(/url\(['"]*(.+)['"]*\)/)[1], | |
download: '' | |
}).text('Download Photo').css({ | |
position: 'fixed', | |
left: '50%', | |
top: '50%', | |
zIndex: 9999, | |
background: '#FFF', | |
fontSize: '70px', | |
border: 'none', | |
lineHeight: '200px', | |
width: '700px', | |
height: '200px', | |
textAlign: 'center', | |
margin: '-100px 0 0 -350px', | |
boxShadow: '0 0 100px rgba(0, 0, 0, 0.8)' | |
}).prependTo('body'); |
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
<a href="javascript:%24(%22%3Ca%3E%22%2C%7Bhref%3A%24(%22.iMedia%20div%22).css(%22background-image%22).match(%2Furl%5C(%5B%27%22%5D*(.%2B)%5B%27%22%5D*%5C)%2F)%5B1%5D%2Cdownload%3A%22%22%7D).text(%22Download%20Photo%22).css(%7Bposition%3A%22fixed%22%2Cleft%3A%2250%25%22%2Ctop%3A%2250%25%22%2CzIndex%3A9999%2Cbackground%3A%22%23FFF%22%2CfontSize%3A%2270px%22%2Cborder%3A%22none%22%2ClineHeight%3A%22200px%22%2Cwidth%3A%22700px%22%2Cheight%3A%22200px%22%2CtextAlign%3A%22center%22%2Cmargin%3A%22-100px%200%200%20-350px%22%2CboxShadow%3A%220%200%20100px%20rgba(0%2C%200%2C%200%2C%200.8)%22%7D).prependTo(%22body%22)">Download Instagram Photo</a> - drag this link to your bookmark bar. |
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
a { | |
position: fixed; | |
left: 50%; | |
top: 50%; | |
z-index: 9999; | |
background: #FFF; | |
font-size: 70px; | |
border: none; | |
-webkit-tap-highlight-color: #fff; | |
line-height: 200px; | |
width: 700px; | |
height: 200px; | |
text-align: center; | |
margin: -100px 0 0 -350px; | |
box-shadow: 0 0 100px rgba(0, 0, 0, 0.8); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Download the bookmarklet here http://jsfiddle.net/Znarkus/U38UE/