User:Archduk3/global.js

/* $(document).ready(function {  $('fieldset div').addClass('showChangesText'); });

$('.ns-8 .WikiaPageHeader h1').prepend('MediaWiki:'); $('.ns-6 .WikiaPageHeader h1').prepend('File:'); $('.ns-10 .WikiaPageHeader h1').prepend('Template:');

/*Wikia fucks up the search bar, this fixes it importScriptPage('SearchGoButton/code.js', 'dev');*/

/* add a button that increases the content size and hides the rail */ function CreateContentResizeButton { var headerWidth = $('header#WikiaPageHeader.WikiaPageHeader details').width; var contentWidth = $('article#WikiaMainContent.WikiaMainContent').width; var catlinksWidth = $('div#catlinks.catlinks').width; if(contentWidth < 1010) { $('section article header ul.wikia-menu-button').after('&rarr;'); $('section article header a.wikia-button').after('&rarr;'); $('section article header a.view-source').after('&rarr;'); if(wgCanonicalNamespace == 'User_blog') { $('section article div#WikiaUserPagesHeader a.wikia-button').after('&rarr;'); }	} } addOnloadHook(CreateContentResizeButton); function ExpandContent(headerWidth, contentWidth, catlinksWidth) { $('header#WikiaPageHeader.WikiaPageHeader details').css({"width": '980px'}); $('article#WikiaMainContent.WikiaMainContent').css({"width": '1010px'}); $('div#catlinks.catlinks').css({"width": '1010px'}); $('div#WikiaRail.WikiaRail').css({"display": 'none'}); $('ul#resizeButton').replaceWith('<ul class="button secondary" id="resizeButton" style="margin-top:2px; vertical-align:top">&larr;</a></ul>'); } function CompressContent(headerWidth, contentWidth, catlinksWidth) { $('header#WikiaPageHeader.WikiaPageHeader details').css({"width": headerWidth}); $('article#WikiaMainContent.WikiaMainContent').css({"width": contentWidth}); $('div#catlinks.catlinks').css({"width": catlinksWidth}); $('div#WikiaRail.WikiaRail').css({"display": 'block'}); $('ul#resizeButton').replaceWith('<ul class="button secondary" id="resizeButton" style="margin-top:2px; vertical-align:top">&rarr;</a></ul>'); }

/** Removing white space below rail: V.1 (rail unusable) $('.WikiaMainContent').css('width','1010px').prepend($('.WikiaRail').css('padding','0 10px 0')); $('.WikiaPageHeader, .WikiaPageHeader details').css({clear: 'left', width: '670px'}); /** Removing white space below rail: V.2 (buggy) $('.WikiaMainContent').css('width','1010px'); $('.WikiaArticle').prepend($('.WikiaRail').css({marginLeft: '10px', padding: '0', position: 'relative', top: '-80px'})); $('.WikiaPageHeader, .WikiaPageHeader details').css({clear: 'left', width: '670px'}); $('.WikiaActivityModule a, .WikiaRail .more').css('color',$('a').css('color'));