User:.krowl25/global.js

/* AjaxRC */ window.ajaxSpecialPages = ['Recentchanges', 'WikiActivity', 'Watchlist', 'Log', 'Contributions', 'StaffLog']; $(function {   if(mw.config.get('wgUserLanguage') == 'pt-br') {        window.AjaxRCRefreshText = 'Atualização automática';        window.AjaxRCRefreshHoverText = 'Atualiza a página automaticamente';    } });

/* DiscussionsRailModule */ window.discussionsModuleConfig = { mostrecent: true };

/* LastEdited */ window.lastEdited = { avatar: false, namespaces: { include: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 110, 111, 500, 828, 829, 1202] } };

/* PageCreator */ window.pageCreatorAvatar = false; window.pageCreatorTimestamp = true; window.pageCreatorNamespaces = [0, 4, 6, 8, 10, 12, 14, 828];

/* QuickCreateMessageWallGreeting */ WallGreetingTemplates = { 'en': '', 'pt': '', 'pt-br': '' }; WallGreetingTemplates = WallGreetingTemplates[mw.config.get('wgContentLanguage')] || WallGreetingTemplates.en; qtMessageWallGreetingTemplate = WallGreetingTemplates; qtEnableMessageWallGreetingOverwrite = true;

/* QuickCreateUserPage */ UserPageTemplates = { 'en': '', 'pt': '', 'pt-br': '' }; UserPageTemplates = UserPageTemplates[mw.config.get('wgContentLanguage')] || UserPageTemplates.en; qtUserPageTemplate = UserPageTemplates; qtEnableUserPageOverwrite = true;

/* RailWAM */ window.railWAM = { showLogAlert: false };

/* SeeMoreActivityButton */ window.SeeMoreActivityButtonRC = true;

/* UserTags */ window.UserTagsJS = { modules: { autoconfirmed: true, inactive: 60, nonuser: true, mwGroups: ['bot', 'bot-global', 'checkuser', 'util', 'voldev'], metafilter: { 'bot': ['bot-global'] }   },    tags: { 'authenticated': {link:'http://community.wikia.com/wiki/Special:ListUsers/authenticated'}, 'bannedfromchat': {f:'Banida do Chat', link:'Special:ChatBanList'}, 'blocked': {f:'Bloqueada', link:'Special:BlockList'}, 'bot': {u:'Bot', link:'Special:ListUsers/bot'}, 'bot-global': {u:'Bot Global', link:'http://community.wikia.com/wiki/Special:ListUsers/bot-global'}, 'bureaucrat': {link:'Special:ListUsers/bureaucrat'}, 'chatmoderator': {f:'Moderadora do Chat', link:'Special:ListUsers/chatmoderator'}, 'checkuser': {link:'Special:ListUsers/checkuser'}, 'content-moderator': {f:'Moderadora de Conteúdo', link:'Special:ListUsers/content-moderator'}, 'council': {link:'http://community.wikia.com/wiki/Special:ListUsers/council'}, 'founder': {f:'Fundadora', link:'Special:ListUsers/sysop'}, 'global-discussions-moderator': {f:'Moderadora global de discussões', link:'http://community.wikia.com/wiki/Special:ListUsers/global-discussions-moderator'}, 'helper': {link:'http://community.wikia.com/wiki/Community_Central:International'}, 'inactive': {u:'Inativo', f:'Inativa'}, 'nonuser': {u:'Nunca Editou'}, 'notautoconfirmed': {u:'Não Confirmado', f:'Não Confirmada'}, 'patroller': {link:'Special:ListUsers/patroller'}, 'rollback': {link:'Special:ListUsers/rollback'}, 'staff': {link:'http://community.wikia.com/wiki/Community_Central:Staff'}, 'sysop': {f:'Administradora', link:'Special:ListUsers/sysop'}, 'threadmoderator': {f:'Moderadora de Discussões',link:'Special:ListUsers/threadmoderator'}, 'util': {link:'http://community.wikia.com/wiki/Special:ListUsers/util'}, 'vanguard': {link:'http://community.wikia.com/wiki/Help:Vanguard'}, 'voldev': {link:'http://community.wikia.com/wiki/Special:ListUsers/voldev'}, 'vstf': {link:'http://community.wikia.com/wiki/Help:SpamTaskForce'} } };

/* Standard Edit Summary */ window.dev = window.dev || {}; window.dev.editSummaries = { select: [ '(clique para navegar)', 'Refatoração', [ 'Cleanup', 'Corrigindo gramática/ortografia', 'Formatando', 'Arrumando o HTML', 'Wikificando', 'Corrigindo predefinição', 'Removendo texto duplicado', 'Corrigindo links', 'Removendo links NewWindowLink', 'Capitalização apropriada da marca, substituindo: Fandom → FANDOM', 'Rebranding, substituindo: Wikia → FANDOM' ],       'Conteúdo', [ 'Atualizando', 'Atualizando de acordo com a versão em inglês', 'Expandindo', 'Revisando' ],       'Revertendo', [ 'Removendo spam', 'Revertendo vandalismo', 'Removendo fanon' ],       'i18n', [ // I probably will not use most of these '+de', '+en', '+es', '+fi', '+fr', '+it', '+ja', '+ko', '+nl', '+pl', '+pt', '+pt-br', '+pt, pt-br', '+ru', '+vi', '+zh', '+i18n' ]   ] };

/* Imports */ importArticles({   type: 'script',    articles: [        'u:dev:AjaxPatrol/code.js',        'u:dev:AjaxRC/code.js',        'u:dev:AllPagesHideRedirect/code.js',        'u:dev:AnchoredRollback/code.js',        'u:dev:BlogLink/code.js',        'u:dev:CategoryRenameAuto-update/code.js',        'u:dev:CodeQuickLinks/code.js',        'u:dev:ConsistentModules/code.js',        'u:dev:DiscussionsFeed.js',        'u:dev:DiscussionsRailModule/code.js',        'u:dev:EditBio/code.js',        'u:dev:EditConflictAlert/code.js',        'u:dev:FindAndReplace/code.js',        'u:dev:GlobalEditcount/code.js',        'u:dev:HoverEditCount/code.js',        'u:dev:ImportJSPage/code.js',        'u:dev:LastEdited/code.js',        'u:dev:MarkBlocked.js',        'u:dev:NavButtonsDropdown.js',        'u:dev:NewImages.js',        'u:dev:PageCreator/code2.js',        'u:dev:QuickAccessToCSSAndJS/code.js',        'u:dev:QuickCreateMessageWallGreeting/code.js', 'u:dev:QuickCreateUserPage/code.js', 'u:dev:RailWAM/code.js', 'u:dev:RedirectReplace.js', 'u:dev:ReferencePopups/code.js', 'u:dev:RevealAnonIP/usercode.js', 'u:dev:SeeMoreActivityButton/code.js', 'u:dev:SignatureCheck/code.js', 'u:dev:Standard_Edit_Summary/code.js', 'u:dev:StickySummary.js', 'u:dev:UserCheck/code.js', 'u:dev:UserTags/code.js', 'u:dev:UTCClock/code.js', 'u:dev:ViewDeleted/code.js', 'u:dev:ViewRemoved/code.js', 'u:dev:View_Source/code.js', 'u:dev:WallGreetingButton/code.js', 'u:dev:WorkingMoreUsersCount.js', 'u:pt-br.ultragustavo25:User:Ultragustavo25/Wikimarks.js', 'u:kocka:User:KockaAdmiralac/UserRegistrationDate.javascript' ] });

/* Moving QuickCreate to a better place */ setTimeout(function {   $('li#quick-cup').prependTo('#my-tools-menu').addClass('overflow');    $('li#quick-cup').insertAfter('#my-tools-menu#quick-cup').addClass('overflow'); }, 2500);

/* Rearranging some modules */ setTimeout(function {   $('.photo-module').insertAfter('.activity-module');    $('.DiscordIntegratorModule').insertAfter('.photo-module');    $('.DiscordIntegratorModule iframe').attr({height: '97%'}); }, 5000);

/* Global navigation links */ $(function {   if(mw.config.get('wgUserLanguage') == 'pt-br') { // Check if the language is set as PT-BR        $('.wds-global-navigation .wds-global-navigation__link').replaceWith( '' + '' + ' Wikis ' + ' ' + ' ' +               '' + '' + '' + 'Explorar Wikis' + '' + '' + 'Central da Comunidade' + '' + '' + 'Central de Operações Tríade</a>' + '</li>' + '' + 'Open Source Library</a>' + '</li>' + '' + 'RecentChangesMultiple</a>' + '</li>' + '' + 'Sandbox</a>' + '</li>' + '</ul>' + ' ' +           ' '        );    } });

/* Linking the page counter to the Special:AllPages */ $(function {   var text = $('.wds-community-header__counter').html;    $('.wds-community-header__counter').replaceWith(''+text+'</a>');    $('head').append(' a.wds-community-header__counter:hover { text-decoration: none; opacity: 0.8; transition: opacity .2s; } '); });

/* Adds a link in Special:Contributions to see the user rights log */ $(function {   if(wgCanonicalSpecialPageName == 'Contributions') {        var usernameurl = $('div#contentSub a:nth-child(1)').text;        $('div#contentSub a:nth-child(8)').after(' | registro de direitos de usuário</a>');    } });

/* Changing the default rollback summary for Quick Tools */ $('a#quicktools-link').click(function {   setTimeout(function { $('input#quicktools-reason').val('Vandalism'); }, 800); });

/* RC instead of WA under the icon in new nav - by Nanaki */ $('.wds-community-header__wiki-buttons a[data-tracking="wiki-activity"]').attr({href: '/wiki/Special:RecentChanges', title: 'Mudanças recentes', 'data-tracking': 'recent-changes'});

/* Bypass Special:InfoboxBuilder - by Nanaki */ if($('.template-classification-type-text').data('type') == 'infobox') $('#ca-edit').attr('href', function(a) { return this.href + '&useeditor=source'; });

/* Open Chat in a new tab */ window.wgWikiaChatWindowFeatures = '';

/** * Name:       UnhideUserWikis * Description: Unhides hidden user wikis in masthead and appends the edit count * Author:     KockaAdmiralac <1405223@gmail.com> */ $(function {   if($('#UserProfileMasthead').length === 0) {        return;    }    $.getJSON(mw.util.wikiScript('api'), { action: 'query', list: 'users', ususers: $('.masthead-info hgroup h1').text, format: 'json' }, function(d) { var u = d.query.users; if(u && u[0] && u[0].userid) { $.getJSON(mw.util.wikiScript('wikia'), {               controller: 'UserProfilePageController',                method: 'renderLightbox',                userId: u[0].userid,                format: 'json'            }, function(da) {                if(da && da.user && da.user.topWikis && da.user.topWikis.length > 0) {                    $('.masthead-info-lower .wikis').remove;                    var el = $('<ul>'),                        tw = da.user.topWikis;                    for(var i in tw) {                        if(tw.hasOwnProperty(i)) {                            var w = tw[i];                            el.append( $('') .append(                                       $('')                                            .attr('href', w.wikiUrl)                                            .text(w.wikiName + ' (' + w.edits + ')')                                    ) );                       }                    }                    $('.masthead-info-lower').append( $('<ul>') .attr('class', 'wikis') .append(                               $(' ')                                    .text('Minhas wikis favoritas')                            ) .append(el) );               }            });        }    }); });