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 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');    }    $('').attr({ title: 'Recent Changes', href: '/wiki/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"]').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');

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'); $('.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'    }); $('.wds-global-navigation__link').remove;

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="wds-global-navigation__link" title="View in Monobook" href="/wiki/' + wgPageName + '?useskin=monobook' + mods + '"</a>Monobook</a>').prependTo('.wds-global-navigation__links-and-search'); 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) { $('.page-header__title').append('<a class="wds-is-squished wds-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'); });       });    } });

// Toggles avatars to 300x300 - moves avatar controls to profile menu $('.masthead-avatar .avatar').mouseover(   function {        $('.UserProfileMasthead .masthead-avatar .avatar').css({ 'max-height': '300px', 'max-width': '300px', width: '300px' });       $('.UserProfileMasthead .masthead-info').css('margin-left', '315px');        $('.UserProfileMasthead').css('min-height', '300px');    }); $('.masthead-avatar .avatar').mouseout(       function {        $('.UserProfileMasthead .masthead-avatar .avatar').css({ 'max-height': '100px', 'max-width': '100px', width: '100px' });       $('.UserProfileMasthead .masthead-info').css('margin-left', '115px');        $('.UserProfileMasthead').css('min-height', '150px');    });

$('') .append('<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" class="wds-icon-tiny"><path d="M1.293 16.293A1 1 0 0 0 1 17v5a1 1 0 0 0 1 1h5c.265 0 .52-.105.707-.293L19 11.414 12.586 5 1.293 16.293zm21.414-10l-5-5a.999.999 0 0 0-1.414 0L14 3.586 20.414 10l2.293-2.293a.999.999 0 0 0 0-1.414z" fill-rule="evenodd"> ') .append($('#userAvatarEdit')) .appendTo('.user-identity-box-edit'); $('') .append('<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" class="wds-icon-tiny"><g fill-rule="evenodd"><path d="M18.417 21.167H5.583V6.5h12.834v14.667zM9.25 2.833h5.5v1.834h-5.5V2.833zm12.833 1.834h-5.5v-2.75A.916.916 0 0 0 15.667 1H8.333a.917.917 0 0 0-.916.917v2.75h-5.5a.917.917 0 0 0 0 1.833H3.75v15.583c0 .507.41.917.917.917h14.666c.507 0 .917-.41.917-.917V6.5h1.833a.916.916 0 1 0 0-1.833z"> <path d="M12 9.25a.917.917 0 0 0-.917.917V17.5a.916.916 0 1 0 1.834 0v-7.333A.917.917 0 0 0 12 9.25m-3.667 0a.917.917 0 0 0-.916.917V17.5a.916.916 0 1 0 1.833 0v-7.333a.917.917 0 0 0-.917-.917m6.417.917V17.5a.916.916 0 1 0 1.833 0v-7.333a.916.916 0 1 0-1.833 0"> </g> ') .append($('#UserAvatarRemove')) .appendTo('.user-identity-box-edit');

$('#userAvatarEdit').css('margin-left', '3px');

$('.avatar-controls span').remove;