MediaWiki:Wikia.js

importScript('MediaWiki:Functions.js'); importScript('MediaWiki:Common.js');

// ============================================================ // BEGIN JavaScript title rewrite -- jQuery version and new wikia skin fixes by Grunny. A big shout out to Grunny who personally helped with implementation on this wiki, via starwars:user talk:CzechOut

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 + ';'); } }

//The following necessary to call the whole thing into life:

addOnloadHook( rewriteTitle );

// END JavaScript title rewrite

$(document).ready(function {	// A big thanks to user:The Librarian who first pointed out the problem this code will fix. This restores normal upload form since the popup one ignores source and license policy. Adapted from http://es.pokemon.wikia.com/wiki/MediaWiki:Wikia.js via Wookieepedia.	$('a.wikia-button.upphotos').unbind('click',UploadPhotos.showDialog); });

//BEGIN code to allow history button to appear on user pages from community:forum:History button for User pages// /* add history to the dropdown menu on all pages function HistoryDropdownMenuItem { $('ul.wikia-menu-button li:first-child ul li:first-child').after('History'); }

addOnloadHook(HistoryDropdownMenuItem); */

// add history just to user pages function History4EditProfile { $('a.wikia-button[data-id$="editprofile"]').before('History'); if (wgCanonicalNamespace >= 'User') { $('ul.wikia-menu-button').before('History'); } } addOnloadHook(History4EditProfile);

//END history on user pages code// /* */