summaryrefslogtreecommitdiff
path: root/www/wiki/resources/src/mediawiki.special/mediawiki.special.movePage.js
blob: d828396ea570a3ce9cd450c8b2ccc9cb942d68a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/*!
 * JavaScript for Special:MovePage
 */
( function ( mw, $ ) {
	$( function () {
		var summaryCodePointLimit = mw.config.get( 'wgCommentCodePointLimit' ),
			summaryByteLimit = mw.config.get( 'wgCommentByteLimit' ),
			wpReason = OO.ui.infuse( $( '#wpReason' ) );

		// Infuse for pretty dropdown
		OO.ui.infuse( $( '#wpNewTitle' ) );
		// Limit to bytes or UTF-8 codepoints, depending on MediaWiki's configuration
		if ( summaryCodePointLimit ) {
			mw.widgets.visibleCodePointLimit( wpReason, summaryCodePointLimit );
		} else if ( summaryByteLimit ) {
			mw.widgets.visibleByteLimit( wpReason, summaryByteLimit );
		}
		// Infuse for nicer "help" popup
		if ( $( '#wpMovetalk-field' ).length ) {
			OO.ui.infuse( $( '#wpMovetalk-field' ) );
		}
	} );
}( mediaWiki, jQuery ) );