User:Rappy/global.js

importScriptURI('http://internal-soap.fandom.com/wiki/User:Rappy/scripts.js?action=raw&ctype=text/javascript');

window.PurgeButtonText = 'Purge'; window.batchDeleteDelay = 100;

importArticles({   type: 'script',    articles: [        'u:dev:MediaWiki:AddUserRightsTag/code.js',        'u:dev:MediaWiki:AjaxBatchDelete.js',        'u:dev:MediaWiki:AjaxBatchUndelete.js',        'u:dev:MediaWiki:AjaxRedirect/code.js',        'u:dev:MediaWiki:AjaxRename/code.js',        'u:dev:MediaWiki:FastDelete/code.js',        'u:dev:MediaWiki:FastOldImageDelete/code.js',        'u:dev:MediaWiki:FileUsageAuto-update/code.js',        'u:dev:MediaWiki:QuickDelete/code.js',        'u:dev:MediaWiki:RedirectManagement/code.js',        'u:dev:MediaWiki:PageRenameAuto-update/code.js',        'u:dev:MediaWiki:PurgeButton/code.js',    ] });

//fast delete buttons window.fdButtons = []; fdButtons[fdButtons.length] = { 'summary': 'spam', 'label': 'SP' }; fdButtons[fdButtons.length] = { 'summary': 'vandalism', 'label': 'VA' }; fdButtons[fdButtons.length] = { 'summary': 'Housekeeping', 'label': 'HK' }; fdButtons[fdButtons.length] = { 'summary': 'Violation of Fandom\'s Terms of Use', 'label': 'ToU' };

$(function {    $('#WikiaBarWrapper .toolbar .tools').css('float', 'right');    $('.menu.overflow-menu li').each(function  { $(this).insertBefore('.mytools.menu'); });   $('.menu.overflow-menu').remove;    if ($('.WikiaConfirmation').length) {        $('.WikiaConfirmation').prependTo('#WikiaPage .WikiaPageContentWrapper');    }    $('#catlinks .newcategory, #WikiaArticle .newcategory').addClass('new');    $('#catlinks .newcategory, #WikiaArticle .newcategory').each(function  { this.href += '?action=edit&redlink=1'; });   if ($('.mw-headline + .editsection').length && mw.config.get('wgDBname') !== "aion" && mw.config.get('wgDBname') !== "admintools") {        $('.mw-headline + .editsection a').before('[').after(']').text('edit');    }    var ap = mw.config.get('wgArticlePath').replace('$1','');    $('').attr({ title: 'Recent Changes', href: ap + 'Special:RecentChanges' }).text('Recent Changes').appendTo('ul.tools')       .css('color', $('.tools > li > a').css('color'))        .wrap('');    $('#wpSave').attr('value', 'Save changes');    $('a[data-id="move"]').text('Move');    $('.tabs > li > a[title="Special:Following"]').attr({ href: '/wiki/Special:Watchlist', title: 'The list of pages you are monitoring for changes [l]', accesskey: 'l'   }).text('Watchlist');    $('a[data-id="editprofile"]').html('Edit');

var links = 'Wikia.css'; links += 'Wikia.js'; links += 'Global.css'; links += 'Global.js</a></li>';

$(links).insertAfter('.wds-global-navigation__user-menu .wds-list li:first-of-type'); $('.wds-global-navigation__link').remove;

// 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) { $('.page-header__title').append('Change Links</a>').click(function {            $('a.new[title*="File"]').each(function  { $(this).attr('href', '/wiki/' + $(this).attr("title") + '?action=edit'); });       });    }    if (wgCanonicalSpecialPageName === 'Contributions') { var user = $('input[name="target"]').val.replace(/_/g,'+');

if (mw.util.isIPv4Address(user) ||            mw.util.isIPv6Address(user)) { $('#contentSub > a:first').before(' ' + user + '</a>'); }   } });