mirror of
https://github.com/StarCitizenTools/mediawiki-skins-Citizen.git
synced 2024-11-12 00:59:46 +00:00
feat: avoid loading unnessecary features
This commit is contained in:
parent
82d48ac4e8
commit
5fcba674ba
|
@ -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
|
||||
|
|
49
skin.json
49
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": {
|
||||
|
|
Loading…
Reference in a new issue