debug start of jobs
[mediawiki.git] / resources / mediawiki.special / mediawiki.special.javaScriptTest.js
blobd413f602cb8bfe21ac63e6a2985b110c05976574
1 /*
2  * JavaScript for Special:JavaScriptTest
3  */
4 jQuery( document ).ready( function( $ ) {
6         // Create useskin dropdown menu and reload onchange to the selected skin
7         // (only if a framework was found, not on error pages).
8         $( '#mw-javascripttest-summary.mw-javascripttest-frameworkfound' ).append( function() {
10                 var     $html = $( '<p><label for="useskin">'
11                                 + mw.message( 'javascripttest-pagetext-skins' ).escaped()
12                                 + ' '
13                                 + '</label></p>' ),
14                         select = '<select name="useskin" id="useskin">';
16                 // Build <select> further
17                 $.each( mw.config.get( 'wgAvailableSkins' ), function( id ) {
18                         select += '<option value="' + id + '"'
19                                 + ( mw.config.get( 'skin' ) === id ? ' selected="selected"' : '' )
20                                 + '>' + mw.message( 'skinname-' + id ).escaped() + '</option>';
21                 } );
22                 select += '</select>';
24                 // Bind onchange event handler and append to form
25                 $html.append(
26                         $( select ).change( function() {
27                                 window.location = QUnit.url( { useskin: $(this).val() } );
28                         } )
29                 );
31                 return $html;
32         } );
33 } );