Created
September 19, 2011 21:04
-
-
Save dawnerd/1227610 to your computer and use it in GitHub Desktop.
Trollify JS
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
!function(){ | |
//These can be anything you want ;) | |
var images = [ | |
'http://28.media.tumblr.com/ei729ojaFm9ickfnHLmkACuuo1_400.jpg', | |
'http://26.media.tumblr.com/ei729ojaFm9ic7489TiIUBvvo1_400.jpg', | |
'http://26.media.tumblr.com/ei729ojaFm9iasuebHQjetZro1_400.jpg', | |
'http://28.media.tumblr.com/ei729ojaFm9i5f8mO0DHWAu3o1_400.jpg' | |
] | |
//let the trolling begin | |
var img = document.getElementsByTagName('IMG'); | |
for(var i = img.length; i--;) img[i].src = images[~~(Math.random()*images.length)] | |
}() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment