User:Evodvi/wikia.js

/** Background randomiser **/

function randomBack { var opts = [ 'http://images4.wikia.nocookie.net/halo/images/8/8a/Wiki-background.jpg', 'http://images3.wikia.nocookie.net/__cb20090419191738/halo/images/b/b1/1240168529-1600x1200.jpg', ];

if (wgPageName=='Main_Page') $('body').css('background-image','url(' + opts[0] + ')'); else $('body').css('background-image','url(' + opts[Math.floor(opts.length*Math.random)] + ')'); } $(randomBack);