mirror of
https://github.com/StarCitizenTools/mediawiki-skins-Citizen.git
synced 2024-11-28 00:01:05 +00:00
feat(core): ✨ only load the inline script if EnablePreferences is true
This commit is contained in:
parent
e5af1717bd
commit
52f4bab1a5
|
@ -65,12 +65,14 @@ class SkinHooks implements
|
|||
return;
|
||||
}
|
||||
|
||||
if ( $this->getConfigValue( 'CitizenEnablePreferences', $out ) === true ) {
|
||||
$script = file_get_contents( MW_INSTALL_PATH . '/skins/Citizen/resources/skins.citizen.scripts/inline.js' );
|
||||
$script = Html::inlineScript( $script );
|
||||
// TODO: Consider turning on cache after this is more stable
|
||||
$script = RL\ResourceLoader::filter( 'minify-js', $script, [ 'cache' => false ] );
|
||||
$out->addHeadItem( 'skin.citizen.inline', $script );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Modify toolbox links
|
||||
|
|
Loading…
Reference in a new issue