MediaWiki:Common.js/WatchlistNotice.js

/* * Description: Hide the watchlist message for one week. * Maintainers: Ruud Koot * Updated by:  darklama */

function addDismissButton { var $watchlistMessage = $('#watchlist-message');

if ( !$watchlistMessage.length ) return; if ( mw.cookie.get('hidewatchlistmessage') === 'yes' ) { $watchlistMessage.hide; return; }

$(' [dismiss] ') .appendTo( $watchlistMessage ) .click( function {			mw.cookie.set('hidewatchlistmessage', 'yes', { 'expires': 7, 'path': '/' });			$watchlistMessage.hide;		}); }

if ( mw.config.get('wgCanonicalSpecialPageName') === 'Watchlist') { $.when( mw.loader.using(['mediawiki.cookie']), $.ready ).then( addDismissButton ); }