mediawiki.special.apisandbox: Use module.exports instead of mw.special
authorTimo Tijhof <krinklemail@gmail.com>
Thu, 26 May 2016 17:40:41 +0000 (18:40 +0100)
committerKrinkle <krinklemail@gmail.com>
Thu, 26 May 2016 17:50:05 +0000 (17:50 +0000)
mw.special.ApiSandbox is not used anywhere, and it's an easy candidate for
converting to the new module export pattern.

This removes the last use of the 'mediawiki.special.js' file, which violates
T92459 due to having styles.

Change-Id: I9b6972d763f34d50479099d4d726d1c77a91c223

resources/Resources.php
resources/src/mediawiki.special/mediawiki.special.apisandbox.js

index 4d5173f..2cc8c2e 100644 (file)
@@ -1737,7 +1737,6 @@ return [
                'styles' => 'resources/src/mediawiki.special/mediawiki.special.apisandbox.css',
                'scripts' => 'resources/src/mediawiki.special/mediawiki.special.apisandbox.js',
                'dependencies' => [
-                       'mediawiki.special',
                        'mediawiki.api',
                        'mediawiki.jqueryMsg',
                        'oojs-ui',
index 7aeafec..3d90307 100644 (file)
        *
        * @class mw.special.ApiSandbox
        */
-       mw.special.ApiSandbox = ApiSandbox = {
+       ApiSandbox = {
                /**
                 * Initialize the UI
                 *
 
        $( ApiSandbox.init );
 
+       module.exports = ApiSandbox;
+
 }( jQuery, mediaWiki, OO ) );