2 * Script for changes list legend
5 /* Remember the collapse state of the legend on recent changes and watchlist pages. */
8 cookieName
= 'changeslist-state',
10 isCollapsed
= mw
.cookie
.get( cookieName
) === 'collapsed';
13 $( '.mw-changeslist-legend' )
15 collapsed
: isCollapsed
17 .on( 'beforeExpand.mw-collapsible', function () {
18 mw
.cookie
.set( cookieName
, 'expanded' );
20 .on( 'beforeCollapse.mw-collapsible', function () {
21 mw
.cookie
.set( cookieName
, 'collapsed' );
24 }( mediaWiki
, jQuery
) );