Skip to content

Instantly share code, notes, and snippets.

@hughrawlinson
Last active March 18, 2016 16:06
Show Gist options
  • Save hughrawlinson/7817250 to your computer and use it in GitHub Desktop.
Save hughrawlinson/7817250 to your computer and use it in GitHub Desktop.
New and improved, in Javascript everything's a cat.

Cat.js

Replaces all the images on a webpage with pictures of cats. Now in ES2015!

// 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