User:Efe Önem/global.js

// Ignoring Russian Star Wars wiki announcements window.announcementsIgnore = { option: 'opt-in-all', exceptWikiIds: [ 1530   ] };

// QuickCreateUserPage window.qtUserPageTemplate = '';

importArticles({   type: 'script',    articles: [        'u:dev:MediaWiki:PageCreator/code2.js',        'u:dev:MediaWiki:LastEdited/code.js',        'u:dev:MediaWiki:MassEdit/code.js',        'u:dev:MediaWiki:AjaxBatchDelete.js',        'u:dev:MediaWiki:DisableInfoboxBuilder.js',        'u:dev:MediaWiki:ReferencePopups/code.js',        'u:dev:MediaWiki:MassCategorization/code.js',        'u:dev:MediaWiki:HistoryKey/code.js',        'u:dev:MediaWiki:AjaxRedirect/code.js',        'u:dev:MediaWiki:PatrolPanel.js',        'u:dev:MediaWiki:QuickCreateUserPage/code.js',        'u:dev:MediaWiki:Rollback/code.js',        'u:dev:MediaWiki:BackToTopButton/code.js',        'u:dev:MediaWiki:CopySectionSource.js',        'u:dev:MediaWiki:UCXSearchBar.js',    ] });

/** * For action=purge to index.php *  change it to POST api.php *  then reload the page * Restores pre-1.28 behavior to MW 1.28+ * Based on meta:User:Glaisher/autoPurge.js, 21 Aug 2016 */ if (( mw.config.get( 'wgAction' ) === 'purge' ) &&   ( $.inArray( 'user', mw.config.get( 'wgUserGroups' )) + 1 )) { $.post( mw.config.get( 'wgScriptPath' ) + '/api.php', {       format: 'none',        action: 'purge',        titles: mw.config.get( 'wgPageName' ).replace( /_/g, ' ' )    }, function  {        // remove action=purge, but keep the rest        location.replace( location.pathname + location.search .replace( /(?:\?|&)action=purge$/i, '' ) .replace( /(\?|&)action=purge&/i, '$1' ) + location.hash );   } ); }

/* Show categories like they used to be */ $( '.page-footer__categories' ).removeClass( 'wds-is-collapsed' ).css( 'padding-top', '18px' ); $( '.page-footer__categories .wds-collapsible-panel__header' ).remove; $( '#articleCategories .special-categories-label' ).css( 'display', 'block' );

// Check if the user has any of the specified rights if (   mediaWiki.config.get('wgUserGroups').includes('rollback') ||    mediaWiki.config.get('wgUserGroups').includes('sysop') ||    mediaWiki.config.get('wgUserGroups').includes('content-moderator') ||    mediaWiki.config.get('wgUserGroups').includes('bureaucrat') ) { // Disable Rollback script on wikis where the user has the specified rights window.RollbackWikiDisable = true; }