User:Archduk3/global.js

$(document).ready(function {  $('fieldset div').addClass('showChangesText').css('right','15px'); });

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

/* 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 < 1000) { $('section article header ul.wikia-menu-button').after(' &larr;Expand&rarr; '); $('section article header a.wikia-button').after(' &larr;Expand&rarr; '); $('section article header a.view-source').after(' &larr;Expand&rarr; '); if(wgCanonicalNamespace == 'User_blog') { $('section article div#WikiaUserPagesHeader a.wikia-button').after(' &larr;&rarr; '); }	} } addOnloadHook(CreateContentResizeButton); function ExpandContent(headerWidth, contentWidth, catlinksWidth) { $('header#WikiaPageHeader.WikiaPageHeader details').css({"width": '980px'}); $('article#WikiaMainContent.WikiaMainContent').css({"width": '1000px'}); $('div#catlinks.catlinks').css({"width": '1000px'}); $('div#WikiaRail.WikiaRail').css({"display": 'none'}); $('ul#resizeButton').replaceWith('<a onclick="CompressContent(' + headerWidth + ', ' + contentWidth + ', ' + catlinksWidth + ');" data-id="resizeButton" style="color:#fff;" title="Compress the content area back to its original width, and restore the side rail."> &rarr;Compress&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('<a onclick="ExpandContent(' + headerWidth + ', ' + contentWidth + ', ' + catlinksWidth + ');" data-id="resizeButton" style="color:#fff;" title="Expands the content area. Note that this will hide the side rail."> &larr;Expand&rarr; </a></ul>'); }

/** Removing white space below rail: V.1 (rail unusable) $('.WikiaMainContent').css('width','1000px').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','1000px'); $('.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'));