mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-11-24 07:43:47 +00:00
Extend new config flag to site styles
Bug: T301212 Change-Id: I50d898a541707063594dfbc16a6bbfaabab42162
This commit is contained in:
parent
182cbf968f
commit
26d5d44535
|
@ -590,7 +590,8 @@ class Hooks implements
|
|||
* @param array &$pages
|
||||
*/
|
||||
public function onResourceLoaderSiteStylesModulePages( $skin, &$pages ): void {
|
||||
if ( $skin === Constants::SKIN_NAME_MODERN ) {
|
||||
$config = MediaWikiServices::getInstance()->getMainConfig();
|
||||
if ( $skin === Constants::SKIN_NAME_MODERN && $config->get( 'VectorShareUserScripts' ) ) {
|
||||
$pages['MediaWiki:Vector.css'] = [ 'type' => 'style' ];
|
||||
}
|
||||
}
|
||||
|
@ -602,7 +603,8 @@ class Hooks implements
|
|||
* @param array &$pages
|
||||
*/
|
||||
public function onResourceLoaderSiteModulePages( $skin, &$pages ): void {
|
||||
if ( $skin === Constants::SKIN_NAME_MODERN ) {
|
||||
$config = MediaWikiServices::getInstance()->getMainConfig();
|
||||
if ( $skin === Constants::SKIN_NAME_MODERN && $config->get( 'VectorShareUserScripts' ) ) {
|
||||
$pages['MediaWiki:Vector.js'] = [ 'type' => 'script' ];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue