User:Surriela/global.js

$(function {   $('#WikiaBarWrapper .toolbar .tools').css('float','right');    $('.menu.overflow-menu li').each(function { $(this).insertBefore('.mytools.menu'); });   $('.menu.overflow-menu').remove;

$('.WikiaHeader nav > ul > li + li').remove; $('.WikiaHeader nav > ul').append($(' ').hide); $('#WikiaSearch input:first').addClass('mysearch'); $('#WikiaSearch button').addClass('mysearchbutton'); if ($('form#WikiaSearch').length) { $('form#WikiaSearch').appendTo('#mysearch').attr('style','padding-left:15px; margin-top:-3px'); $('#mysearch').show; }   $('a[data-id="wikiactivity"]').attr({title:'Recent Changes',href:'/wiki/Special:RecentChanges'}).html('Recent Changes').clone.appendTo('ul.tools').wrap('').removeClass('wikia-button secondary'); $('a[data-id="editprofile"]').html('Edit'); $('#wpSave').attr('value','Save'); $('.overflow a[data-name="prefixindex"]').html('My pages').attr('href','/wiki/Special:PrefixIndex?prefix=Surriela&namespace=2'); $('#my-tools-menu').css({left: 'auto', right: '108px'}); $('.tools-menu').css({left: 'auto', right: '188px'}); $('Wikia.cssWikia.jsGlobal.cssGlobal.js</a></li>').insertAfter('.AccountNavigation .subnav li:first'); $('#WikiaArticle').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("wikia.nocookie.net") != -1 ) { var link = wgServer + '/wiki/File:' + a2.getAttribute('data-image-name'); a2.setAttribute('href',link); }       }    }  // Detects non-existent file links and adds a button to change // links to edit the page rather than an upload page if ($('a.new[title*="File"]').length) { $('#WikiaPageHeader').append('<a class="wikia-button" style="margin-right: 10px">Change Links</a>').click(function {      $('a.new[title*="File"]').each(function  { $(this).attr('href', '/wiki/' + $(this).attr("title") + '?action=edit'); });   });  } });

PurgeButtonText = 'Purge'; importScriptPage('PurgeButton/code.js', 'dev');