mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/RelatedArticles
synced 2024-11-24 00:05:50 +00:00
Do not lazy-load an event logging module
Since we're always depending on the event logging module, we can make it a dependency in extension.json, rather than loading it lazily. Bug: T157375 Change-Id: Ia57f390586e123c6010a7daf23a3d851daf079ce
This commit is contained in:
parent
bf7a9a5b37
commit
13c630343e
|
@ -84,6 +84,7 @@
|
|||
"mediawiki.Uri",
|
||||
"mediawiki.viewport",
|
||||
"ext.relatedArticles.readMore.gateway",
|
||||
"ext.relatedArticles.readMore.eventLogging",
|
||||
"jquery.throttle-debounce"
|
||||
],
|
||||
"targets": [
|
||||
|
@ -93,7 +94,8 @@
|
|||
},
|
||||
"ext.relatedArticles.readMore": {
|
||||
"dependencies": [
|
||||
"mediawiki.util"
|
||||
"mediawiki.util",
|
||||
"ext.relatedArticles.readMore.eventLogging"
|
||||
],
|
||||
"scripts": [
|
||||
"resources/ext.relatedArticles.readMore/index.js"
|
||||
|
|
|
@ -60,8 +60,7 @@
|
|||
// which should never happen given the if statement.
|
||||
mw.loader.using( [
|
||||
'ext.cards',
|
||||
'ext.relatedArticles.readMore',
|
||||
'ext.relatedArticles.readMore.eventLogging'
|
||||
'ext.relatedArticles.readMore'
|
||||
] ),
|
||||
relatedPages.getForCurrentPage( LIMIT )
|
||||
).done( function ( _, pages ) {
|
||||
|
@ -94,7 +93,5 @@
|
|||
loadRelatedArticles();
|
||||
}
|
||||
|
||||
mw.loader.using( 'ext.relatedArticles.readMore.eventLogging' ).done( function () {
|
||||
mw.track( 'ext.relatedArticles.logEnabled', { isEnabled: shouldShowReadMore } );
|
||||
} );
|
||||
mw.track( 'ext.relatedArticles.logEnabled', { isEnabled: shouldShowReadMore } );
|
||||
}( jQuery, mediaWiki ) );
|
||||
|
|
Loading…
Reference in a new issue