Merge "Improve documentation of foreign-structured-upload-form-label-own-work-message...
[lhc/web/wiklou.git] / resources / src / mediawiki.special / mediawiki.special.watchlist.js
1 /*!
2 * JavaScript for Special:Watchlist
3 *
4 * This script is only loaded, if the user opt-in a setting in Special:Preferences,
5 * that the watchlist should be automatically reloaded, when a filter option is
6 * changed in the header form.
7 */
8 jQuery( function ( $ ) {
9 // add a listener on all form elements in the header form
10 $( '#mw-watchlist-form input, #mw-watchlist-form select' ).on( 'change', function () {
11 // submit the form, when one of the input fields was changed
12 $( '#mw-watchlist-form' ).submit();
13 } );
14
15 } );