Skip to content

Commit

Permalink
feat(core): ✨ enable caching for inline JS
Browse files Browse the repository at this point in the history
  • Loading branch information
alistair3149 committed May 6, 2024
1 parent 58bab74 commit 5d59a6d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions includes/Hooks/SkinHooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,7 @@ public function onBeforePageDisplay( $out, $skin ): void {
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 ] );
$script = RL\ResourceLoader::filter( 'minify-js', $script );
$out->addHeadItem( 'skin.citizen.inline', $script );
}
}
Expand Down

0 comments on commit 5d59a6d

Please sign in to comment.