2 * JavaScript for Special:Undelete
6 if ( mw.config.get( 'wgCanonicalSpecialPageName' ) !== 'Undelete' ) {
11 const $widget = $( '#wpComment' ).closest( '.oo-ui-widget' );
13 if ( !$widget.length ) {
14 // If the user has permission to see only the deleted
15 // revisions but not restore or the page is not currently
16 // deleted there'd be no comment field and no checkboxes.
20 const wpComment = OO.ui.infuse( $widget );
22 const wpCommentList = OO.ui.infuse( $( '#wpCommentList' ).closest( '.oo-ui-widget' ) );
24 $( '#mw-undelete-invert' ).on( 'click', () => {
25 $( '.mw-undelete-revlist input[type="checkbox"]' ).prop( 'checked', ( i, val ) => !val );
28 mw.widgets.visibleCodePointLimitWithDropdown( wpComment, wpCommentList, mw.config.get( 'wgCommentCodePointLimit' ) );