mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-12-18 09:10:59 +00:00
766bdedf70
* Use the new mw.track() handlers from WikimediaEvents * Ensure that 'integration' and 'mode' are set on init events, since they're not guessed in the handler any more * Remove the setting of 'editingStatsId' tracking parameter, now happens in WikimediaEvents by setting an API AJAX option * Replace ve.track with mw.track in VE-MW, so that we don't have to copy the events manually here and in other extensions This must be merged together with WikimediaEvents change Iace4d53a972396ca5b8713000570cc47c9986034 (but we can't use Depends-On, because CI requires code here to be removed first). Bug: T332438 Change-Id: I0ef0a96aafdf89a4ebe32131a85b18c25744bb2c
10 lines
307 B
JavaScript
10 lines
307 B
JavaScript
// In VE-MW, track events using MediaWiki's system instead of VisualEditor's
|
|
ve.track = mw.track;
|
|
ve.trackSubscribe = mw.trackSubscribe;
|
|
|
|
ve.trackSubscribe( 'activity.', function ( topic, data ) {
|
|
mw.track( 'visualEditorFeatureUse', ve.extendObject( data, {
|
|
feature: topic.split( '.' )[ 1 ]
|
|
} ) );
|
|
} );
|