User:King Dragonhoff/global.js

QuickThreads = { message: "Inappropriate", 'notify-admin': false };

importArticles({   type: 'script',    articles: [        'w:dev:WallGreetingButton/code.js',        'u:dev:QuickThreads/code.js',        'u:dev:QuickComments/code.js',        'u:dev:MediaWiki:WHAM/code.2.js'    ] });

AjaxDiff = { expiry: "1 year", reason: "Vandalism" }; importScriptPage( 'AjaxDiff/code.js', 'dev' );

nullEditDelay = 500; importScriptPage('MassNullEdit/code.js', 'dev');

massProtectDelay = 500; importScriptPage('MediaWiki:MassProtect/code.js', 'dev');

// Modified Purge Button Script /*jshint browser:true, jquery:true*/ /*global mediaWiki*/ ( function ( $, mw ) {   'use strict';    var nsNr = mw.config.get( 'wgNamespaceNumber' ),        translations = {            bg: 'Обновяване',            en: 'Refresh',            es: 'Actualizar',            de: 'Neu laden',            fr: 'Actualiser',            hu: 'Frissítés',            it: 'Aggiorna',            ko: '새로고침',            nl: 'Herladen',            pl: 'Odśwież',            pt: 'Actualizar',            'pt-br': 'Atualizar',            ru: 'Обновить',            tl: 'Muling i-sariwa',            uk: 'Оновити',            vi: 'Làm tươi trang',            zh: '刷新',            'zh-hans': '刷新',            'zh-Hant': '重新整理'        },        theText = (typeof window.PurgeButtonText === 'string' && window.PurgeButtonText) ||            translations[mw.config.get('wgContentLanguage')] || translations.en;    if ( nsNr < 0 || window.PurgeButtonsLoaded || document.getElementById( 'control_purge' ) ) { return; }   window.PurgeButtonsLoaded = true; // prevent duplicate running (but not dupe buttons from outside this code) $( addPurgeButton ); function purgePage { var page = encodeURIComponent( mw.config.get( 'wgPageName' ) ); $.get( '/index.php?title=' + page + '&action=purge&debug=true', function {            location.reload( true );        } ); $('html,body').css( {           display: 'block',            overflow: 'hidden'        } ); $( ' ' ).appendTo( document.body ) .css( 'height', $( window ).height ); }   function addOasisPurgeButton  { var selector; switch (nsNr) { case 500: case 502: selector = $( '#WikiaUserPagesHeader' ); break; case 2: case 3: selector = $( '.UserProfileActionButton' ); if ( selector.length ) break; default: selector = $( '#WikiaPageHeader' ); }       selector.find('.wikia-menu-button').first.find('ul') .append(''); }   function addPurgeButton  { switch( mw.config.get( 'skin' ) ) { case 'uncyclopedia': /* monobook clone, pass to monobook */ case 'wowwiki': /* monobook clone, pass to monobook */ case 'lostbook': /* monobook clone, pass to monobook */ case 'monobook': $('#p-cactions > .pBody > ul').append(''); break; case 'oasis': case 'wikia': addOasisPurgeButton; break; }       $( '.custom-purge-button' ).text( theText ).click( purgePage ); }   } ( jQuery, mediaWiki ) );