2 * JavaScript for Special:RevisionDelete
5 var colonSeparator
= mw
.message( 'colon-separator' ).text(),
6 summaryCodePointLimit
= mw
.config
.get( 'wgCommentCodePointLimit' ),
7 summaryByteLimit
= mw
.config
.get( 'wgCommentByteLimit' ),
8 $wpRevDeleteReasonList
= $( '#wpRevDeleteReasonList' ),
9 $wpReason
= $( '#wpReason' ),
10 filterFn = function ( input
) {
11 // Should be built the same as in SpecialRevisionDelete::submit()
12 var comment
= $wpRevDeleteReasonList
.val();
13 if ( comment
=== 'other' ) {
15 } else if ( input
!== '' ) {
16 // Entry from drop down menu + additional comment
17 comment
+= colonSeparator
+ input
;
22 // Limit to bytes or UTF-8 codepoints, depending on MediaWiki's configuration
23 if ( summaryCodePointLimit
) {
24 $wpReason
.codePointLimit( summaryCodePointLimit
, filterFn
);
25 } else if ( summaryByteLimit
) {
26 $wpReason
.byteLimit( summaryByteLimit
, filterFn
);