diff --git a/extension.json b/extension.json index 6192c8de..1dd4888a 100644 --- a/extension.json +++ b/extension.json @@ -110,7 +110,10 @@ "ResourceModules": { "ext.uls.common": { "targets": [ "desktop", "mobile" ], - "scripts": "js/ext.uls.common.js", + "scripts": [ + "js/ext.uls.eventlogger.js", + "js/ext.uls.common.js" + ], "styles": "css/ext.uls.less", "skinStyles": { "monobook": "css/ext.uls-monobook.css", diff --git a/includes/UniversalLanguageSelectorHooks.php b/includes/UniversalLanguageSelectorHooks.php index e19dd598..ded9f6ed 100644 --- a/includes/UniversalLanguageSelectorHooks.php +++ b/includes/UniversalLanguageSelectorHooks.php @@ -107,13 +107,7 @@ class UniversalLanguageSelectorHooks { * Hook: BeforePageDisplay */ public static function addModules( $out, $skin ) { - global $wgULSPosition, $wgULSGeoService, $wgULSEventLogging; - - // If EventLogging integration is enabled, load the schema module - // and the event logging functions module - if ( $wgULSEventLogging ) { - $out->addModules( 'ext.uls.eventlogger' ); - } + global $wgULSPosition, $wgULSGeoService; // Soft dependency to Wikibase client. Don't enable CLL if links are managed manually. $excludedLinks = $out->getProperty( 'noexternallanglinks' ); @@ -468,12 +462,12 @@ class UniversalLanguageSelectorHooks { } /** - * Conditionally register module ext.uls.eventlogger. + * Conditionally register modules. * * @param ResourceLoader $resourceLoader */ public static function onResourceLoaderRegisterModules( ResourceLoader $resourceLoader ) { - global $wgULSEventLogging, $wgVersion; + global $wgVersion; $modules = []; $modules['ext.uls.displaysettings'] = [ @@ -506,17 +500,6 @@ class UniversalLanguageSelectorHooks { $modules['ext.uls.preferences']['dependencies'][] = 'mediawiki.api.options'; } - if ( $wgULSEventLogging ) { - $modules['ext.uls.eventlogger'] = [ - 'scripts' => 'js/ext.uls.eventlogger.js', - 'dependencies' => [ - 'mediawiki.user', - ], - 'localBasePath' => __DIR__ . '/../resources', - 'remoteExtPath' => 'UniversalLanguageSelector/resources', - ]; - } - $resourceLoader->register( $modules ); } }