Skip to content

Instantly share code, notes, and snippets.

@spudtrooper
Created June 9, 2019 11:35
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save spudtrooper/6b454c4232be5725ebfd3d06a347ea42 to your computer and use it in GitHub Desktop.
/*
* Shows the various sized images for an instagram image.
*
* Usage:
* 1. Click on an instagram thumbnail.
* 2. Run this.
*/
(function() {
let srcset = document.querySelector('img[sizes="600px"]')
.getAttribute('srcset');
srcset
.split(',')
.map(function(e) {
let p = e.split(' ');
return p[1] + ' ' + p[0];
})
.forEach(function(e) {
console.log(e);
});
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment