User:GerritH/global.js

/* Advanced */ window.AdvancedOasisUI = { accountNavFollowedPages: false, accountNavWatchlist: false, categoryRedlink: true, RCHeader: false, DefaultSourceMode: true, lightbox: true, randomPageLimitedTo: '', activity2RC: false, userLang: true, };

importArticles({   type: 'script',    articles: [         'u:dev:View_Source/code.js',         'u:dev:MiniComplete/code.js',         'u:dev:PortableCSSPad/code.js',         'u:dev:AjaxRC/code.js',         'u:dev:AjaxPatrol/code.js',         'u:dev:AdvancedOasisUI/code.js',    ] });

// AutoEditDropdown config - http://dev.wikia.com/wiki/AutoEditDropdown window.AutoEditDropdownConfig = { expandedAreaContribute: true, expandedAreaEdit: true }; importArticles({   type: 'script',    articles: [        'w:c:dev:AutoEditDropdown/code.js'    ] });

/*jshint browser:true, jquery:true*/ /*global mediaWiki*/ ( function ( $, mw ) {   'use strict';    var nsNr = mw.config.get( 'wgNamespaceNumber' ),        translations = {            en: 'Refresh',            es: 'Actualizar',            de: 'Neu laden',            fr: 'Actualiser',            hu: 'Frissítés',            nl: 'Herladen',            pl: 'Odśwież',            ru: 'Обновить'        },        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', 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(''+ theText + '');    }    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(''+ theText + ''); break; case 'oasis': case 'wikia': addOasisPurgeButton; break; }       $( '#purge' ).click( purgePage ); }   } ( jQuery, mediaWiki ) );

importArticles({   type: 'script',    articles: [        'u:dev:NoImageLightbox/code.js'    ] });

$('.wikia-header-mask').prepend('Änderungen');

// Skin-Wechsel-Button für Monobook-Design zu Oasis-Design und umgekehrt. $( function {  if ( !document.getElementById( 'ca-skins' ) ) {    if ( skin === 'oasis' || skin === 'wikia' ) {      $( ' MB </li>' ).appendTo( '#AccountNavigation' );    } else {      $( '<a href="/index.php?title=' + encodeURIComponent( wgPageName ) + '&useskin=wikia">Oasis</a></li>' ).appendTo( '#p-cactions > .pBody > ul' );    }   } } );