Skip to content

Instantly share code, notes, and snippets.

@rolandcrosby
Created June 20, 2015 16:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rolandcrosby/17ccf63679fcf1a6d49b to your computer and use it in GitHub Desktop.
Save rolandcrosby/17ccf63679fcf1a6d49b to your computer and use it in GitHub Desktop.
get instagram url
(
function() {
function getSrc() {
var el = document.querySelector('div[role=dialog]');
if (el == null) {
el = document;
}
var media = el.querySelector('video');
if (media == null) {
media = el.querySelector('img[id]');
}
return media.src;
}
window.location = getSrc();
}
)();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment