Sovq (Message Wall | contribs) No edit summary |
Sovq (Message Wall | contribs) (typo) |
||
Line 31: | Line 31: | ||
:I imagine this would do the job |
:I imagine this would do the job |
||
<pre style="margin-left:24px"> |
<pre style="margin-left:24px"> |
||
− | /* Random |
+ | /* Random wordmark in Oasis */ |
var logoArray = new Array(); |
var logoArray = new Array(); |
||
logoArray[0] = 'URL IMAGE 1'; |
logoArray[0] = 'URL IMAGE 1'; |
Revision as of 22:52, 14 November 2011
Forums: Admin Central Index → Watercooler → Random Logo Oasis
Central's forums are a place for the community to help other members.
To contact staff directly or to report bugs, please use Special:Contact.
To contact staff directly or to report bugs, please use Special:Contact.
Note: This topic has been unedited for 4540 days. It is considered archived - the discussion is over. Do not add to unless it really needs a response.
How can I create a random logo in Oasis? I know the code for Monobook:
/* Random logo */
function RandomLogo() {
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));
document.getElementById('p-logo').innerHTML = '<a accesskey="z" title="Home Page [alt-shift-z]" href="/wiki/HOMEPAGE" style="background-image: url(' + logoArray[chosenLogo] + ');"/>';
}
addOnloadHook(RandomLogo);
but in Oasis the logo is a section like
<h1 class="wordmark medium graphic">
<a href="/wiki/HOMEPAGE" accesskey="z">
<img alt="HOMEPAGE" src="URL IMAGE">
</a>
</h1>
any ideas? leviathan
_
89
21:56, 14 November, 2011 (UTC)
- 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)