mediawiki-extensions-Visual.../modules/ve-mw/ve.track.js
Ed Sanders e3659d4846 Prefer arrow callbacks
Change-Id: Ia05b27f7c71c33580ffd0718e3bbc673dd8b3d63
2024-05-01 14:11:54 +01:00

10 lines
301 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.', ( topic, data ) => {
mw.track( 'visualEditorFeatureUse', ve.extendObject( data, {
feature: topic.split( '.' )[ 1 ]
} ) );
} );