Last modified: 2013-08-11 05:37:22 UTC
The 'mediawiki.special' module defines 'scripts' => 'resources/mediawiki.special/mediawiki.special.js', 'styles' => 'resources/mediawiki.special/mediawiki.special.css', but several special pages call only $out->addModuleStyles( 'mediawiki.special' ); ignoring the JS. mediawiki.special.js currently only defines an mediaWiki.special namespace, so this is not causing any harm. Conversely, Special:RecentChanges does not addModuleStyles( 'mediawiki.special' ) and instead mentions it as a dependency of its script module, so it does not load mediawiki.special.css if JS is disabled; RecentPages doesn't seem to use any of the styles in mediawiki.special.css so again no harm. I noticed this while researching how code handles addModule{s,Scripts,Styles}. Roan suggested that if code has CSS that should load when JS is disabled then it should be in a separate module to avoid this confusion, I don't see a naming convention for this (a '_nojs' suffix perhaps?).