User:Slayingthehalcyon/global.js

importScriptPage('User:Callofduty4/ChatHacks.js', 'c');

importArticles({   type: 'script',    articles: [        'w:coreychambers:MediaWiki:VectorSkin.js',        'u:redisc0very:MediaWiki:Slash_Commands/code.js',        'u:dev:MediaWiki:AjaxBatchDelete/code.2.js',        'u:dev:MediaWiki:MessageBlocker/code.js',        'u:halcyonictests:MediaWiki:TabComplete.js',        'u:halyconictests:MediaWiki:EasyPublish.js',        'u:halcyonictests:MediaWiki:Toraload.js',        'u:halcyonictests:MediaWiki:PseudVector.js',        'u:halcyonictests:MediaWiki:SnowPlow.js',        'u:halcyonictests:MediaWiki:Spells.js',        'u:halcyonictests:MediaWiki:SlashCommands.js',        'u:halcyonictests:MediaWiki:Carrots.js',        'u:halcyonictests:MediaWiki:HouseCleaning.js',        'u:halcyonictests:MediaWiki:MBload.js',       'u:halcyonictests:MediaWiki:Collapse.js'   ]  });

// Miscellaneous $(function {   var buttons = {        monobook: {            href: 'useskin=monobook'        },        wikiamobile: {            href: 'useskin=wikiamobile'        },        vector: {            href: 'useskin=monobook&usevector=1&usesitecss=0'        },        qqx: {            href: 'uselang=qqx'        },        debug: {            href: 'debug=true'        },        test: {            id: 'test-mode',            text: (mw.config.get('wgContentReviewTestModeEnabled') ? 'exit' : 'enter') + ' test mode',           handler: function {                if (mw.config.get('wgContentReviewTestModeEnabled')) {                    $.nirvana.sendRequest({ controller: 'ContentReviewApiController', method: 'disableTestMode', callback: function(e) { if (e.status) { window.location.reload; }                       }                    });                } else {                    $.nirvana.sendRequest({ controller: 'ContentReviewApiController', method: 'enableTestMode', data: { pageId: mw.config.get('wgArticleId'), wikiId: mw.config.get('wgCityId'), editToken: mw.user.tokens.get('editToken') },                       callback: function(e) { if (e.status) { window.location.reload; }                       }                    });                }            }        }    };        $('.global-navigation .hubs-links').html('');        for (var i in buttons) {            $('.global-navigation .hubs-links').append( $('') .attr({                       href: (buttons[i].href ? mw.config.get('wgArticlePath').replace(/\$1/g, (mw.config.get('wgPageName') + (!!window.location.search ? window.location.search + '&' : '?') + buttons[i].href + (!!window.location.hash ? window.location.hash : ))) : ),                       class: 'globalnav-button',                        id: (buttons[i].id ? buttons[i].id : '')                   }) .text(buttons[i].text || i)           );            if (buttons[i].id && buttons[i].handler && typeof buttons[i].handler == 'function') {                $('#' + buttons[i].id).bind('click', buttons[i].handler);            }        }    // load pseudo-vector on usevector=1    if (mw.config.get('skin') == 'monobook' && $.getUrlVar('usevector')) {        importStylesheetPage('Pseudo-Vector/code.css', 'dev');    } });