Forum:Global CSS and JavaScript

Hi all, we're rolling out a new feature (which was supposed to exist for the last few months, but it got lost with the upgrade), which is global CSS and JavaScripts.

On Central Wikia, you can edit Special:Mypage/global.css and Special:Mypage/global.js and the changes you'll put there will be visible on all 1.10 wikis (at this moment - almost every wiki apart from our biggest ones). Some technical info:


 * the files are loaded for every skin
 * if you want to code JavaScript only for a specific skin, make use of the  variable in JavaScript, where every wiki stores its skin name
 * the CSS is loaded after the default MediaWiki CSS, but before the site specific CSS, so if you want to overwrite the site's CSS (not recommended), make use of the !important property
 * it is advisible to use the CSS only to style your JavaScript additions, since there's no way to determine which skin is active on the wiki (yet)

Soon we'll roll out two new global files on Central, MediaWiki:Global.css and MediaWiki:Global.js, but they'll be available only for staff to add CSS/JS globally for every user (both logged in and anonymous). We'll probably put the most popular CSS and JS there, so including them on your wikis will be as simple as adding the correct class/ID to your divs, without playing with JavaScript (right now, I mean of the dropdown boxes, some extra menus, etc.).

Hope you'll like this new feature and provide us feedback on it :). Datrio 10:30, 13 June 2007 (UTC)

Rar, about time. ;) --Jack Phoenix (Contact) 10:33, 13 June 2007 (UTC)