Created
February 27, 2012 14:22
-
-
Save appleton/1924149 to your computer and use it in GitHub Desktop.
Troll any canvas element
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 canvas = document.getElementsByTagName('canvas'), | |
| img = new Image(); | |
| img.onload = function(){ | |
| Array.prototype.slice.call(canvas).forEach(function(el){ | |
| el.getContext('2d').drawImage(img, 0, 0); | |
| }); | |
| }; | |
| img.src = 'http://thegurglingcod.typepad.com/.a/6a00d8341c387d53ef0148c84decb8970c-320wi'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ohh dear, I am not enabling vandalism am I?