Skip to content

Instantly share code, notes, and snippets.

@rodrigoalviani
Last active August 29, 2015 14:13
Show Gist options
  • Save rodrigoalviani/5dba9f4c3be40a39d88b to your computer and use it in GitHub Desktop.
Save rodrigoalviani/5dba9f4c3be40a39d88b to your computer and use it in GitHub Desktop.
Let the pages as if they were made in the 80s
$('*').each(function () {
var colors = ['aqua', 'blue', 'fuchsia', 'gray', 'green', 'lime', 'maroon', 'navy', 'olive', 'orange', 'purple', 'red', 'silver', 'teal', 'yellow'];
$(this).css('background-color', colors[Math.floor(Math.random()*colors.length)]);
$(this).css('font-family', 'Comic Sans MS');
});
$('img').each(function () {
var imgs = [
'http://www.animatedgif.net/devilish/coolskul.gif',
'http://www.animatedgif.net/devilish/devildance_e0.gif',
'http://www.animatedgif.net/devilish/diablo_standing_e0.gif',
'http://www.animatedgif.net/devilish/skull4_e0.gif',
'http://www.animatedgif.net/cartoons/critter_e0.gif',
'http://www.animatedgif.net/cartoons/macarena_e0.gif',
'http://www.animatedgif.net/people/jackhammer_e0.gif',
'http://www.animatedgif.net/people/babies/dancing_baby_e0.gif',
'http://www.animatedgif.net/sports/equestrian_e0.gif',
'http://www.animatedgif.net/art/home.gif',
'http://www.animatedgif.net/welcome/bi-plane_e0.gif',
'http://www.animatedgif.net/welcome/ctcannon_e0.gif',
'http://www.animatedgif.net/welcome/wspider02.gif',
'http://www.animatedgif.net/welcome/wc178x28_e0.gif',
'http://www.animatedgif.net/welcome/welcome01_e0.gif',
'http://www.animatedgif.net/email/anim0044-1_e0.gif',
'http://www.animatedgif.net/computers/hacky_e0.gif',
'http://www.animatedgif.net/seasonal/xmas/jalsnowglobe_e0.gif',
'http://www.animatedgif.net/seasonal/halloween/kvsmpumpkin_e0.gif',
'http://www.animatedgif.net/fireexplosions/fireline_e0.gif',
'http://www.animatedgif.net/fireexplosions/flash5_e0.gif',
'http://www.123gifs.eu/free-gifs/underconstruction/underconstruction-0085.gif',
'http://www.animatedgif.net/sitemessages/guestbook/guest-1_e0.gif',
'http://www.animatedgif.net/clockscounters/counter1_e0.gif',
'http://www.animatedgif.net/games/sdbpacman_e0.gif',
'http://www.animatedgif.net/games/rbicetile_e0.gif',
'http://i1187.photobucket.com/albums/z398/djcubstud/CUBSTUD%20GIFS/Homo-dancetroup.gif',
'http://tonygifsjavas.com.br/galeria_gifs_animes/construcao/images/construcao_01.gif'
];
if (!$(this).hasClass('logo') && !$(this).hasClass('img-logo') && $(this).attr('itemprop') != 'logo')
$(this).attr('src', imgs[Math.floor(Math.random()*imgs.length)]);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment