2 * JavaScript for Special:EditTags
6 var summaryCodePointLimit
= mw
.config
.get( 'wgCommentCodePointLimit' ),
7 summaryByteLimit
= mw
.config
.get( 'wgCommentByteLimit' ),
8 $wpReason
= $( '#wpReason' ),
9 $tagList
= $( '#mw-edittags-tag-list' );
11 if ( $tagList
.length
) {
13 /* eslint-disable camelcase */
14 placeholder_text_multiple
: mw
.msg( 'tags-edit-chosen-placeholder' ),
15 no_results_text
: mw
.msg( 'tags-edit-chosen-no-results' )
16 /* eslint-enable camelcase */
20 $( '#mw-edittags-remove-all' ).on( 'change', function ( e
) {
21 $( '.mw-edittags-remove-checkbox' ).prop( 'checked', e
.target
.checked
);
23 $( '.mw-edittags-remove-checkbox' ).on( 'change', function ( e
) {
24 if ( !e
.target
.checked
) {
25 $( '#mw-edittags-remove-all' ).prop( 'checked', false );
29 // Limit to bytes or UTF-8 codepoints, depending on MediaWiki's configuration
30 // use maxLength because it's leaving room for log entry text.
31 if ( summaryCodePointLimit
) {
32 $wpReason
.codePointLimit();
33 } else if ( summaryByteLimit
) {
34 $wpReason
.byteLimit();