User:Godisme/global.js

function History4EditProfile { $('a.wikia-button[data-id$="editprofile"]').before('History'); if (wgCanonicalNamespace == 'User') { $('ul.wikia-menu-button').before('History'); } } addOnloadHook(History4EditProfile);

function AddRecentChanges { $('div.buttons').css({'width': '310px'}); $('a[data-id="wikiactivity"]').after('Recent Changes'); }

addOnloadHook(AddRecentChanges);

/* add a button that increases the content size and hides the rail */ function CreateContentResizeButton { if(wgTitle != wgMainPageTitle) { $('ul.wikia-menu-button').after(' Expand <--> '); } }

addOnloadHook(CreateContentResizeButton);

function ExpandContent { $('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(' Compress >--< '); }

function CompressContent { $('header#WikiaPageHeader.WikiaPageHeader details').css({"width": '670px'}); $('article#WikiaMainContent.WikiaMainContent').css({"width": '680px'}); $('div#catlinks.catlinks').css({"width": '638px'}); $('div#WikiaRail.WikiaRail').css({"display": 'block'}); $('ul#resizeButton').replaceWith(' Expand <--> </a></ul>'); }

/* kill image popups - 3/30/11 */ function changeimagelinks {

if (window.skin == 'oasis') { var article = $('#WikiaArticle, .LatestPhotosModule, #article-comments'); }   else { var article = $('#bodyContent'); }

article.unbind('click.lightbox');

var a = document.getElementsByTagName("a"); for ( var t = 0; t < a.length; ++t ) { var a2 = a[t]; var img = a2.getElementsByTagName("img"); if ( img[0] != null ) { if ( a2.href.indexOf("images.wikia.com") != -1 ) { var link = wgServer + '/wiki/File:' + a2.href.substring(a2.href.lastIndexOf('/') + 1); a2.setAttribute('href',link); }       }    } }

addOnloadHook(changeimagelinks);