Last active
August 29, 2015 13:57
-
-
Save juanbrujo/9508131 to your computer and use it in GitHub Desktop.
Get Image from Instagram: bookmarklet that get's the image shown on certain URL within Instagram
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
// Code | |
var url = $('.Item .iMedia .Image').attr('src'); | |
if(url){ | |
window.open(url,'_self'); | |
} else { | |
alert('There\'s no photo.'); | |
} | |
// The Bookmarklet | |
javascript:(function(e,a,g,h,f,c,b,d)%7Bif(!(f%3De.jQuery)%7C%7Cg>f.fn.jquery%7C%7Ch(f))%7Bc%3Da.createElement("script")%3Bc.type%3D"text/javascript"%3Bc.src%3D"http://ajax.googleapis.com/ajax/libs/jquery/"%2Bg%2B"/jquery.min.js"%3Bc.onload%3Dc.onreadystatechange%3Dfunction()%7Bif(!b%26%26(!(d%3Dthis.readyState)%7C%7Cd%3D%3D"loaded"%7C%7Cd%3D%3D"complete"))%7Bh((f%3De.jQuery).noConflict(1),b%3D1)%3Bf(c).remove()%7D%7D%3Ba.documentElement.childNodes%5B0%5D.appendChild(c)%7D%7D)(window,document,"1.6.2",function(%24,L)%7Bvar url %3D %24(%27.Item .iMedia .Image%27).attr(%27src%27)%3Bif(url)%7Bwindow.open(url,%27_self%27)%3B%7D else %7Balert(%27There%5C%27s no photo.%27)%3B%7D%7D)%3B |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment