User:Rappy/global.js

importScriptURI('http://internal.vstf.wikia.com/index.php?title=User:Rappy_4187/scripts.js&action=raw&ctype=text/javascript');

// PurgeButton PurgeButtonText = 'Purge';

importArticles({   type: 'script',    articles: [        'u:dev:MediaWiki:FastDelete/code.js',        'u:dev:MediaWiki:QuickDelete/code.js',        'u:dev:MediaWiki:PurgeButton/code.js'    ] });

//fast delete buttons var 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 Wikia\'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');    }    $('a[data-id="wikiactivity"]').attr({ title: 'Recent Changes', href: '/wiki/Special:RecentChanges' }).html('Recent Changes').clone.appendTo('ul.tools')       .removeClass('wikia-button secondary').wrap('')        .css('color', $('.tools > li > a').css('color'));    $('#wpSave').attr('value', 'Save changes');    $('a[data-id="move"]').html('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');

$('Wikia.cssWikia.jsGlobal.cssGlobal.js</li>').insertAfter('.AccountNavigation .subnav li:first'); $('.masthead-info hgroup h2').insertAfter('.masthead-info hgroup h1').css({       display: 'inline',        paddingLeft: '10px'    }).show; $('.UserProfileActionButton').show.prependTo('.tabs-container').css({       margin: '4px 320px 0 0',        float: 'right',        padding: '0'    }); $('.hubs-links').html('');

if (wgAction != 'edit') { var mods = ""; if (document.URL.indexOf('?') != -1) { mods = '&' + document.URL.substring(document.URL.indexOf('?') + 1); if (mods.indexOf('&useskin=') != -1) { mods = mods.replace(/&useskin=\w+/, ""); }       }        switch (skin) { case 'uncyclopedia': case 'monobook': $('<a title="View in Oasis" href="/wiki/' + wgPageName + '?useskin=oasis' + mods + '">Oasis</a></li>').appendTo('#p-cactions ul'); break;

case 'oasis': case 'wikia': $('<a class="cell-link" title="View in Monobook" href="/wiki/' + wgPageName + '?useskin=monobook' + mods + '"</a>Monobook</a>').appendTo('.hubs-links'); break; }   }

// 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'); });       });    } });