Replaces all the images on a webpage with pictures of cats. Now in ES2015!
Last active
March 18, 2016 16:06
-
-
Save hughrawlinson/7817250 to your computer and use it in GitHub Desktop.
New and improved, in Javascript everything's a cat.
This file contains 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
// This is the best thing that any browser console is used for | |
Array.prototype.forEach.bind(document.querySelectorAll('img'),(e)=>{e.setAttribute('src','http://www.placekitten.com/'+e.width+'/'+e.height)})() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment