User:.krowl25/global.js

$(function {

if (mw.config.get('wgAction') === 'edit' && mw.util.getParamValue('oldid')) $(wpSummary).val('rv '+mw.util.getParamValue('oldid'));

$('.WikiaBarWrapper .tools > li:has(.global-shortcuts-help-entry-point,[data-tracking="admindashboard/toolbar/admin"])').hide; [ [    '?useskin='+(mw.config.get('skin') === 'oasis' ? 'fandomdesktop' : 'oasis'), 'Alternar skin' ], [   mw.util.getUrl('Special:MultipleActivity'), 'MultipleActivity' ] ].forEach(function(tool) { $( !isNaN(tool[2]) ? '.WikiaBarWrapper .tools-menu > li:nth-child('+tool[2]+')' : '.WikiaBarWrapper .mytools' ).before( $('', { class: 'overflow' }).append(     $('', { href: tool[0], text: tool[1] })    ) ) });

if (mw.util.getParamValue('diff')) { document.onkeydown = function(e) { if (!e.ctrlKey) return; if (e.shiftKey) return; switch (e.code) { case 'ArrowLeft': if($('a#differences-prevlink')[0]) $('a#differences-prevlink')[0].click; break; case 'ArrowRight': if ($('a#differences-nextlink')[0]) $('a#differences-nextlink')[0].click; break; } } }

if ((/pt(-br)?/).test(mw.config.get('wgContentLanguage'))) { PRAoptions = { editSummary: 'Atualizando links de páginas (automático)' } LIRoptions = { editSummary: 'Atualizando links de arquivos (automático)' }

window.fdButtons = [ { label: 'SL', summary: 'Serviço de limpeza' }, { label: 'L', summary: 'Limpeza' }, { label: 'V', summary: 'Vandalismo' }, { label: 'S', summary: 'Spam' }, { label: 'B', summary: 'Página em branco' } ]; }

window.BackToTopLoaded = true; // same as ctrl + arrow up

window.discussionsModuleConfig = { mostrecent: true };

InactiveUsers = { text: 'Inativo', months: 2 };

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] } };

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

window.qtUserPageTemplate = ''; //window.qtEnableUserPageOverwrite = true;

window.dev = window.dev || {}; window.dev.i18n = window.dev.i18n || {}; window.dev.i18n.overrides = window.dev.i18n.overrides || {}; window.dev.i18n.overrides['PortableListUsers'] = window.dev.i18n.overrides['PortableListUsers'] || {}; window.dev.i18n.overrides['PortableListUsers']['title'] = 'PortableListUsers';

var scripts = { common: [ 'u:dev:MediaWiki:AbuseLogRC.js', 'u:dev:MediaWiki:AjaxBatchDelete/code.js', 'u:dev:MediaWiki:AjaxDelete/code.js', //'u:dev:MediaWiki:AjaxUndo/code.js', 'u:dev:MediaWiki:AllPagesHideRedirect/code.js', 'u:dev:MediaWiki:AnchoredRollback/code.js', //'u:dev:MediaWiki:CategoryRenameAuto-update/code.js', 'u:dev:MediaWiki:CodeQuickLinks/code.js', 'u:dev:MediaWiki:EditConflictAlert/code.js', 'u:dev:MediaWiki:EditLeaderboard.js', 'u:dev:MediaWiki:FastDelete/code.js', 'u:dev:MediaWiki:FileUsageAuto-update/code.js', 'u:dev:MediaWiki:FirstEditDate.js', //'u:dev:MediaWiki:ImageMapEdit.js', 'u:dev:MediaWiki:InactiveUsers/code.js', 'u:dev:MediaWiki:LastEdited/code.js', 'u:dev:MediaWiki:MarkBlocked.js', 'u:dev:MediaWiki:MassPatrol/code.js', 'u:dev:MediaWiki:MultipleActivity.js', 'u:dev:MediaWiki:NewImages.js', 'u:dev:MediaWiki:NewPagesUser.js', 'u:dev:MediaWiki:PageCreator/code2.js', 'u:dev:MediaWiki:PageRenameAuto-update/code.js', 'u:dev:MediaWiki:PortableListUsers.js', 'u:dev:MediaWiki:ProtectionIcons.js', 'u:dev:MediaWiki:QuickCreateUserPage/code.js', 'u:dev:MediaWiki:QuickPurge.js', 'u:dev:MediaWiki:RedirectManagement/code.js', 'u:dev:MediaWiki:ReferencePopups/code.js', 'u:dev:MediaWiki:SeeMoreActivityButton/code.js', //'u:dev:MediaWiki:ShowUserGroups.js', 'u:dev:MediaWiki:ShowWROnToolbar.js', 'u:dev:MediaWiki:StickySummary.js', 'u:dev:MediaWiki:UserAndIPTools.js', //'u:dev:MediaWiki:ViewDeleted/code.js', 'u:dev:MediaWiki:View_Source/code.js', 'u:dev:MediaWiki:WHAM/code.2.js', //'u:dev:MediaWiki:Wikimarks/code.js' ], fandomdesktop: [ //'u:dev:MediaWiki:SkinSwitchFD.js', 'u:dev:MediaWiki:StickyRailToggler.js', 'u:dev:MediaWiki:ThemeToggler.js' ], oasis: [ 'u:dev:MediaWiki:ContribsLink/code.js', //'u:dev:MediaWiki:DiscussionsRailModule/code.js', 'u:dev:MediaWiki:MinimalTestModeAlert.js', 'u:dev:MediaWiki:Sofix.js', 'u:dev:MediaWiki:UTCClock/code.js' ] }; if (mw.config.get('isGamepedia')) { mw.loader.getScript('https://dev.fandom.com/wiki/MediaWiki:ArticlesAsResources.js?action=raw&ctype=text/javascript').then(function {   importArticles({ type: 'script', articles: scripts.common.concat(scripts[mw.config.get('skin')]) }); }); } else { importArticles({   type: 'script',    articles: scripts.common.concat(scripts[mw.config.get('skin')])  }); }

if (mw.config.get('skin') !== 'oasis') return;

$('.wds-community-header .wds-community-header__wordmark>a, .wds-community-header .wds-community-header__sitename>a').attr('href', mw.util.getUrl(mw.config.get('wgMainPageTitle').replace(/ /g, '_'))); $('.wds-community-header__local-navigation .wds-dropdown__content>ul.wds-list>li>a[data-tracking="explore-main-page"]').hide;

$('.wds-community-header__counter').append( $('', { href: mw.util.getUrl('Special:AllPages') })  .append( $('.wds-community-header__counter span') ) ); mw.util.addCSS('\ .wds-community-header__counter a { color: var(--theme-header-text-color) }\  .wds-community-header__counter a:hover { color: var(--theme-header-text-color--hover) }\ ');

$('.wds-community-header__wiki-buttons .wds-dropdown__content>ul.wds-list').prepend( $('').append( $('', { href: mw.util.getUrl('Special:Analytics'), text: 'Análises' }) ) );

});