From 6b758fc982972ee60856af0b766383f3aae97f65 Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Fri, 18 Dec 2015 14:03:53 -0800 Subject: [PATCH] Remove mediawiki.special.javaScriptTest module We're almost ready to drop the non-plain mode of Special:JavaScriptTest in favour of Special:JavaScript/qunit/plain. There's a few mobile-related extensions still using the non-karma mode for qunit testing. However, none of them make use of the Skin selector, which was mainly a debug thing I added in the initial version. It no longer makes sense since our tests now enforce an anti-dependency on skin html and other context. Encouraging testing in multiple skins in the old UI therefore no longer makes sense. This also fixes one of the most frequent errors in resourceloader logs and gets rid of an ugly hack in Resources.php that causes a small amount of overhead in ResourceLoader::__construct(). > MessageBlobStore failed to find skinname-fallback > MessageBlobStore failed to find skinname-apioutput Change-Id: Idaacf718703883c6a7e83a17ccd3f41ebdca53d1 --- includes/specials/SpecialJavaScriptTest.php | 2 - resources/Resources.php | 10 ----- .../mediawiki.special.javaScriptTest.js | 37 ------------------- 3 files changed, 49 deletions(-) delete mode 100644 resources/src/mediawiki.special/mediawiki.special.javaScriptTest.js diff --git a/includes/specials/SpecialJavaScriptTest.php b/includes/specials/SpecialJavaScriptTest.php index fbdefea43a..bb3513009f 100644 --- a/includes/specials/SpecialJavaScriptTest.php +++ b/includes/specials/SpecialJavaScriptTest.php @@ -106,8 +106,6 @@ class SpecialJavaScriptTest extends SpecialPage { return; } - $out->addModules( 'mediawiki.special.javaScriptTest' ); - $method = 'view' . ucfirst( $framework ); $this->$method(); $out->setPageTitle( $this->msg( diff --git a/resources/Resources.php b/resources/Resources.php index c66dcb2181..26a5ea5713 100644 --- a/resources/Resources.php +++ b/resources/Resources.php @@ -1866,16 +1866,6 @@ return array( 'mediawiki.special.watchlist' => array( 'scripts' => 'resources/src/mediawiki.special/mediawiki.special.watchlist.js', ), - 'mediawiki.special.javaScriptTest' => array( - 'scripts' => 'resources/src/mediawiki.special/mediawiki.special.javaScriptTest.js', - 'messages' => array_merge( Skin::getSkinNameMessages(), array( - 'colon-separator', - 'javascripttest-pagetext-skins', - ) ), - 'dependencies' => 'mediawiki.Uri', - 'position' => 'top', - 'targets' => array( 'desktop', 'mobile' ), - ), 'mediawiki.special.version' => array( 'styles' => 'resources/src/mediawiki.special/mediawiki.special.version.css', ), diff --git a/resources/src/mediawiki.special/mediawiki.special.javaScriptTest.js b/resources/src/mediawiki.special/mediawiki.special.javaScriptTest.js deleted file mode 100644 index fb74e4ec2e..0000000000 --- a/resources/src/mediawiki.special/mediawiki.special.javaScriptTest.js +++ /dev/null @@ -1,37 +0,0 @@ -/*! - * JavaScript for Special:JavaScriptTest - */ -( function ( mw, $ ) { - $( function () { - - // Create useskin dropdown menu and reload onchange to the selected skin - // (only if a framework was found, not on error pages). - $( '#mw-javascripttest-summary' ).append( function () { - - var $html = $( '

' ), - select = ' further - $.each( mw.config.get( 'wgAvailableSkins' ), function ( id ) { - select += ''; - } ); - select += ''; - - // Bind onchange event handler and append to form - $html.append( - $( select ).change( function () { - var url = new mw.Uri(); - location.href = url.extend( { useskin: $( this ).val() } ); - } ) - ); - - return $html; - } ); - } ); - -}( mediaWiki, jQuery ) ); -- 2.20.1