mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-12-01 01:16:30 +00:00
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 ]
|
||
|
} ) );
|
||
|
} );
|