blob: e3cf598454537815d74b038f9ed7f8894a544954 (
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:Undelete
*/
( function ( mw, $ ) {
$( function () {
var summaryCodePointLimit = mw.config.get( 'wgCommentCodePointLimit' ),
summaryByteLimit = mw.config.get( 'wgCommentByteLimit' ),
wpComment = OO.ui.infuse( $( '#wpComment' ).closest( '.oo-ui-widget' ) );
$( '#mw-undelete-invert' ).click( function () {
$( '.mw-undelete-revlist input[type="checkbox"]' ).prop( 'checked', function ( i, val ) {
return !val;
} );
} );
// Limit to bytes or UTF-8 codepoints, depending on MediaWiki's configuration
if ( summaryCodePointLimit ) {
mw.widgets.visibleCodePointLimit( wpComment, summaryCodePointLimit );
} else if ( summaryByteLimit ) {
mw.widgets.visibleByteLimit( wpComment, summaryByteLimit );
}
} );
}( mediaWiki, jQuery ) );
|