* Defines the ResourceLoader modules that should be added to the skin
* It is recommended that skins wishing to override call parent::getDefaultModules()
* and substitute out any modules they wish to change by using a key to look them up
+ *
+ * For style modules, use setupSkinUserCss() instead.
+ *
* @return array Array of modules with helper keys for easy overriding
*/
public function getDefaultModules() {
'content' => [
'mediawiki.page.ready',
],
- // modules that exist for legacy reasons
- 'legacy' => ResourceLoaderStartUpModule::getLegacyModules(),
// modules relating to search functionality
'search' => [],
// modules relating to functionality relating to watching an article
'user' => [],
];
+ // Preload jquery.tablesorter for mediawiki.page.ready
+ if ( strpos( $out->getHTML(), 'sortable' ) !== false ) {
+ $modules['content'][] = 'jquery.tablesorter';
+ }
+
+ // Preload jquery.makeCollapsible for mediawiki.page.ready
+ if ( strpos( $out->getHTML(), 'mw-collapsible' ) !== false ) {
+ $modules['content'][] = 'jquery.makeCollapsible';
+ }
+
// Add various resources if required
if ( $wgUseAjax && $wgEnableAPI ) {
if ( $wgEnableWriteAPI && $user->isLoggedIn()
return $wgLogo;
}
+ /**
+ * Whether the logo should be preloaded with an HTTP link header or not
+ * @since 1.29
+ * @return bool
+ */
+ public function shouldPreloadLogo() {
+ return false;
+ }
+
/**
* @return string HTML
*/