diff --git a/includes/SkinCitizen.php b/includes/SkinCitizen.php index 0ec616df..d531f663 100644 --- a/includes/SkinCitizen.php +++ b/includes/SkinCitizen.php @@ -228,6 +228,22 @@ class SkinCitizen extends SkinMustache { return $urls; } + /** + * Returns the javascript entry modules to load. Only modules that need to + * be overriden or added conditionally should be placed here. + * @return array + */ + public function getDefaultModules() { + $modules = parent::getDefaultModules(); + + $modules['content'] = array_diff( $modules['content'], [ + // Citizen provides its own implementation. Loading this will break display. + 'mediawiki.toc' + ] ); + + return $modules; + } + /** * Set up optional skin features * @@ -264,6 +280,7 @@ class SkinCitizen extends SkinMustache { $out->addBodyClasses( 'skin-citizen-has-toc' ); // Disabled style condition loading due to pop in $options['scripts'][] = 'skins.citizen.scripts.toc'; + $options['styles'][] = 'skins.citizen.styles.toc'; } // Drawer sitestats diff --git a/skin.json b/skin.json index 1b591811..7eb3fa38 100644 --- a/skin.json +++ b/skin.json @@ -27,7 +27,6 @@ "styles": [ "skins.citizen.styles", "skins.citizen.styles.fonts", - "skins.citizen.styles.toc", "skins.citizen.icons", "skins.citizen.icons.ca", "skins.citizen.icons.es", @@ -93,7 +92,13 @@ "desktop", "mobile" ], - "features": [], + "features": { + "content-parser-output": false, + "content-body": false, + "logo": false, + "legacy": false, + "toc": false + }, "styles": [ "resources/skins.citizen.styles/skin.less" ] }, "skins.citizen.styles.debug": { @@ -102,7 +107,13 @@ "desktop", "mobile" ], - "features": [], + "features": { + "content-parser-output": false, + "content-body": false, + "logo": false, + "legacy": false, + "toc": false + }, "styles": [ "resources/skins.citizen.styles.debug/skins.citizen.styles.debug.less" ] }, "skins.citizen.styles.fonts": { @@ -111,7 +122,13 @@ "desktop", "mobile" ], - "features": [], + "features": { + "content-parser-output": false, + "content-body": false, + "logo": false, + "legacy": false, + "toc": false + }, "styles": [ "resources/skins.citizen.styles.fonts/skins.citizen.styles.fonts.less" ] }, "skins.citizen.styles.sections": { @@ -120,7 +137,13 @@ "desktop", "mobile" ], - "features": [], + "features": { + "content-parser-output": false, + "content-body": false, + "logo": false, + "legacy": false, + "toc": false + }, "styles": [ "resources/skins.citizen.styles.sections/skins.citizen.styles.sections.less" ] }, "skins.citizen.styles.sitestats": { @@ -129,7 +152,13 @@ "desktop", "mobile" ], - "features": [], + "features": { + "content-parser-output": false, + "content-body": false, + "logo": false, + "legacy": false, + "toc": false + }, "styles": [ "resources/skins.citizen.styles.sitestats/skins.citizen.styles.sitestats.less" ] }, "skins.citizen.styles.toc": { @@ -138,7 +167,13 @@ "desktop", "mobile" ], - "features": [], + "features": { + "content-parser-output": false, + "content-body": false, + "logo": false, + "legacy": false, + "toc": false + }, "styles": [ "resources/skins.citizen.styles.toc/skins.citizen.styles.toc.less" ] }, "skins.citizen.scripts": {