From a46b7a819eaa4b46552f0ce9c7d33921566cdf2f Mon Sep 17 00:00:00 2001 From: Alex Monk Date: Thu, 1 Oct 2015 20:35:25 +0100 Subject: [PATCH] Hack to stop logging edit events for non-desktop targets Mobile target, for example, has events logged in the MobileFrontend extension instead (which covers both the wikitext editor there and the VE integration) Bug: T110272 Bug: T109525 Change-Id: I521f1825dc9c0a135db54cd005cda723908f14bc --- modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js | 1 + modules/ve-mw/init/ve.init.mw.Target.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js index 5e93023a69..4f95f68064 100644 --- a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js +++ b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js @@ -67,6 +67,7 @@ ve.init.mw.DesktopArticleTarget = function VeInitMwDesktopArticleTarget( config ); this.originalDocumentTitle = document.title; this.tabLayout = mw.config.get( 'wgVisualEditorConfig' ).tabLayout; + this.events = new ve.init.mw.TargetEvents( this ); // Initialization this.$element.addClass( 've-init-mw-desktopArticleTarget' ); diff --git a/modules/ve-mw/init/ve.init.mw.Target.js b/modules/ve-mw/init/ve.init.mw.Target.js index 5de88bbb28..a171d35ff8 100644 --- a/modules/ve-mw/init/ve.init.mw.Target.js +++ b/modules/ve-mw/init/ve.init.mw.Target.js @@ -50,7 +50,7 @@ ve.init.mw.Target = function VeInitMwTarget( pageName, revisionId, config ) { this.editToken = mw.user.tokens.get( 'editToken' ); this.submitUrl = ( new mw.Uri( mw.util.getUrl( this.pageName ) ) ) .extend( { action: 'submit' } ); - this.events = new ve.init.mw.TargetEvents( this ); + this.events = { track: $.noop, trackActivationStart: $.noop, trackActivationComplete: $.noop }; this.preparedCacheKeyPromise = null; this.clearState();