It is also loaded by ChangesList (and subclasses), but the changes
list might not get a chance to ever execute that code if there are no
changes to show.
This fixes an issue where the legend would sometimes display unstyled
on Special:RecentChangesLinked.
Bug: 59959
Change-Id: Ia1741306303aa3d2641b47bf19efef540ec64779
* Add page-specific modules.
*/
protected function addModules() {
- $this->getOutput()->addModules( array(
- 'mediawiki.special.recentchanges',
- ) );
+ $out = $this->getOutput();
+ $out->addModules( 'mediawiki.special.recentchanges' );
+ // This modules include styles and behavior for the legend box, load it unconditionally
+ $out->addModuleStyles( 'mediawiki.special.changeslist' );
+ $out->addModules( 'mediawiki.special.changeslist.js' );
}
protected function getGroupName() {
$user = $this->getUser();
$output = $this->getOutput();
- $output->addModuleStyles( 'mediawiki.special.changeslist' );
- $output->addModules( 'mediawiki.special.changeslist.js' );
# Anons don't get a watchlist
$this->requireLogin( 'watchlistanontext' );