Admin Forum:Random Logo Oasis

How can I create a random logo in Oasis? I know the code for Monobook:

but in Oasis the logo is a section like any ideas?


 * I imagine this would do the job

 /* Random wordmark in Oasis */ var logoArray = new Array; logoArray[0] = 'URL IMAGE 1'; logoArray[1] = 'URL IMAGE 2'; logoArray[2] = 'URL IMAGE 3'; var chosenLogo = Math.round(Math.random * (logoArray.length - 1)); $('#WikiHeader > .wordmark.medium.graphic a img').attr('src', logoArray[chosenLogo]);
 * — Sovq 22:51, November 14, 2011 (UTC)

Thanks, it works though it takes some time before changing the logo...


 * Hmm there is another little problem... it doesn't change every time you load a page, but only if you clear your cache.
 * Maybe that's not the case, it seems to work.


 * The script might be in conflict with other scripts on your wiki. In particular, the one for Monobook, if they're both loaded. Without a link to the wiki in question I won't be able to verify. — Sovq 07:38, November 15, 2011 (UTC)


 * The wiki is http://onepiece.risposte.wikia.com/, but it seems to working fine (aside for that little delay).


 * Hmm.. is the Monobook version also loading with delay? Could you point me to where it is? A temporary fix that comes to my mind would be replacing the current 'static' wordmark with a transparent image. That way it won't look so buggy. — Sovq 17:24, November 15, 2011 (UTC)