User:Archduk3/global.js

/* skin change buttons */ function CreateSkinChangeButtons { //Oasis buttons $('div.buttons a:first-child').before('MonobookVector'); //Monobook buttons $('#p-cactions .pBody ul li:nth-last-child(1)').after('OasisVector'); } addOnloadHook(CreateSkinChangeButtons);

/* $(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 < 1000) { $('section article header ul.wikia-menu-button').after('&rarr;'); $('section article header a.wikia-button').after('<ul class="button secondary" id="resizeButton" style="margin-top:2px; vertical-align:top"><a onclick="ExpandContent(' + headerWidth + ', ' + contentWidth + ', ' + catlinksWidth + ');" data-id="resizeButton" title="Expand the content area.">&rarr;</a></ul>'); $('section article header a.view-source').after('<ul class="button secondary" id="resizeButton" style="margin-top:2px; vertical-align:top"><a onclick="ExpandContent(' + headerWidth + ', ' + contentWidth + ', ' + catlinksWidth + ');" data-id="resizeButton" title="Expand the content area.">&rarr;</a></ul>'); if(wgCanonicalNamespace == 'User_blog') { $('section article div#WikiaUserPagesHeader a.wikia-button').after('<ul class="button secondary" id="resizeButton" style="margin-top:2px; vertical-align:top"><a onclick="ExpandContent(' + headerWidth + ', ' + contentWidth + ', ' + catlinksWidth + ');" data-id="resizeButton" title="Expand the content area.">&rarr;</a></ul>'); }	} } 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('<ul class="button secondary" id="resizeButton" style="margin-top:2px; vertical-align:top"><a onclick="CompressContent(' + headerWidth + ', ' + contentWidth + ', ' + catlinksWidth + ');" data-id="resizeButton" title="Compress the content area.">&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"><a onclick="ExpandContent(' + headerWidth + ', ' + contentWidth + ', ' + catlinksWidth + ');" data-id="resizeButton" title="Expand the content area.">&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'));