User:Vozhan/global.js

if (mw.config.get('wgCityId') === '177') { importArticle({       type: 'style',        article: 'u:dev:MediaWiki:WikiaCommunityCentralTheme/code.css'    }); }

importArticles({    type: 'script',    articles: [        'u:dev:MediaWiki:AdminDashboard JS-Button/code.js',    ] });

(function {   if ( mw.config.get('wgCanonicalSpecialPageName') !== 'AdminDashboard' || window.AdminDashboardImportJSButtonLoaded ) {       return;    }    window.AdminDashboardImportJSButtonLoaded = true;    var AdminDashboardImportJSButton = {        init: function(i18n) {            console.log(i18n);            this.$control = $('', { 'class': 'control', 'data-tooltip': i18n.msg('tooltip').plain }).append( $('', {                   'class': 'set',                    href: mw.util.getUrl('MediaWiki:ImportJS', { action: 'edit' })                }).append(                    $(' ', { 'class': 'representation AdminDashboardImportJSButton' }).append( $(' ').append(                           $(' ', { text: 'ImportJS' })                       )                    ),                    'JS'                ) ).hover($.proxy(this.hover, this), $.proxy(this.unhover, this));           $('section.wiki ul.controls').append(this.$control);            this.$tooltip = $('.control-section.wiki > header > .dashboard-tooltip');        },        hover: function(e) {            this.$tooltip.text(this.$control.data('tooltip'));        },        unhover: function(e) {            this.$tooltip.text('');        },        hook: function(i18n) {            i18n.loadMessages('AdminDashboard ImportJS-Button')                .then($.proxy(this.init, this));        }    }; });