Skip to content

Instantly share code, notes, and snippets.

@tanmayrajani
Last active November 10, 2018 11:40
Show Gist options
  • Save tanmayrajani/11a2a219808d3576738bde6ea58f7baa to your computer and use it in GitHub Desktop.
Save tanmayrajani/11a2a219808d3576738bde6ea58f7baa to your computer and use it in GitHub Desktop.
javascript: (function() {
document.querySelectorAll('img:not([alt*="profile picture"])').forEach(e => {
var t = e.attributes.getNamedItem("srcset").value;
window.open(t.substring(t.indexOf("750w,") + 5, t.indexOf("1080w") - 1))
});
}())
@tanmayrajani
Copy link
Author

Need to be on the image-detail page (not the popup, if you are on popup, just hit refresh)

It works seamlessly for single image but for multiple images, there seems to be an issue. When there are multiple images (say 6), Instagram seems to remove first few or last few depending on the current image index.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment