Created
June 9, 2019 11:35
-
-
Save spudtrooper/6b454c4232be5725ebfd3d06a347ea42 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| /* | |
| * 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