Created
May 5, 2013 18:31
-
-
Save jlewin/5521698 to your computer and use it in GitHub Desktop.
Fallback for cases where no OpenGraph or RichSnippet image exist and websnap fails. Modeled after the behavior exhibited by Google+
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
| var images = document.querySelectorAll('img'); | |
| for(var x in images) { | |
| var w = parseInt(images[x].getAttribute('width')); | |
| if(w > 100) | |
| console.log(images[x].src); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment