mirror of
https://github.com/StarCitizenTools/mediawiki-skins-Citizen.git
synced 2024-11-24 06:24:22 +00:00
Add additional check to avoid lazyload hook affect other skin
This commit is contained in:
parent
03c1b75b04
commit
143ecb98e7
|
@ -77,6 +77,12 @@ class CitizenHooks {
|
|||
* @return bool
|
||||
*/
|
||||
public static function onThumbnailBeforeProduceHTML( $thumb, &$attribs, &$linkAttribs ) {
|
||||
// It's better to exit before any additional check
|
||||
// Seems like the hook somehow affected other skins
|
||||
if ( $context->getSkin() !== 'citizen' ) {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
$config = MediaWikiServices::getInstance()->getConfigFactory()->makeConfig( 'Citizen' );
|
||||
$lazyloadEnabled = $config->get( 'CitizenEnableLazyload' );
|
||||
|
|
Loading…
Reference in a new issue