MediaWiki:Common.js

/* Any JavaScript here will be loaded for all users on every page load. */

/* REPLACES WITH THE NAME OF THE USER BROWSING THE PAGE REQUIRES COPYING Template:USERNAME. */ $(function UserNameReplace {   if (typeof(disableUsernameReplace) != 'undefined' && disableUsernameReplace || wgUserName === null) return;    $("span.insertusername").text(wgUserName); });

/* TITTLE REWRITE Title rewrite * Rewrites the page's title, used by Template:Title * By Sikon * jQuery version and new wikia skin fixes by Grunny * Copied from w:c:harrypotter */ function rewriteTitle { if( typeof( window.SKIP_TITLE_REWRITE ) != 'undefined' && window.SKIP_TITLE_REWRITE ) { return; }	if( $('#title-meta').length == 0 ) { return; }	var newTitle = $('#title-meta').html; if( skin == "oasis" ) { $('header.WikiaPageHeader > h1').html(' ' + newTitle + ' '); $('header.WikiaPageHeader > h1').attr('style','text-align:' + $('#title-align').html + ';'); } else { $('.firstHeading').html(' ' + newTitle + ' '); $('.firstHeading').attr('style','text-align:' + $('#title-align').html + ';'); } }