Debian Codegraph @

resources/src/mediawiki.misc-authed-curate/edittags.js

raw symbols SCIP
1 /*!
2 * JavaScript for Special:EditTags
3 */
4 ( function () {
5 if ( mw.config.get( 'wgCanonicalSpecialPageName' ) !== 'EditTags' ) {
6 return;
7 }
8 $( () => {
9 const $wpReason = $( '#wpReason' );
10 const $tagList = $( '#mw-edittags-tag-list' );
11
12 if ( $tagList.length ) {
13 $tagList.chosen( {
14 /* eslint-disable camelcase */
15 placeholder_text_multiple: mw.msg( 'tags-edit-chosen-placeholder' ),
16 no_results_text: mw.msg( 'tags-edit-chosen-no-results' )
17 /* eslint-enable camelcase */
18 } );
19 }
20
21 $( '#mw-edittags-remove-all' ).on( 'change', ( e ) => {
22 $( '.mw-edittags-remove-checkbox' ).prop( 'checked', e.target.checked );
23 } );
24 $( '.mw-edittags-remove-checkbox' ).on( 'change', ( e ) => {
25 if ( !e.target.checked ) {
26 $( '#mw-edittags-remove-all' ).prop( 'checked', false );
27 }
28 } );
29
30 $wpReason.codePointLimit( mw.config.get( 'wgCommentCodePointLimit' ) );
31 } );
32
33 }() );