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