From 61205be62aa0e94b089fc71b2e3e57814fb98f3f Mon Sep 17 00:00:00 2001 From: Ori Livneh Date: Sun, 27 Jan 2013 23:29:49 -0800 Subject: [PATCH] Remove ClickTracking calls ClickTracking is deprecated; the config var gating this behavior is set to false; the data is going to /dev/null; no one is interested in analyzing it. I think it's dead, Jim. Change-Id: I71ea8c174e5e38b28f128ccd380ed2a25ad50606 --- README | 4 ++++ WikiEditor.hooks.php | 3 --- WikiEditor.php | 4 ---- modules/jquery.wikiEditor.toc.js | 2 -- modules/jquery.wikiEditor.toolbar.js | 30 ---------------------------- 5 files changed, 4 insertions(+), 39 deletions(-) diff --git a/README b/README index 2851211d..6c6a77cb 100644 --- a/README +++ b/README @@ -15,3 +15,7 @@ require_once( "$IP/extensions/WikiEditor/WikiEditor.php" ); $wgDefaultUserOptions['usebetatoolbar'] = 1; $wgDefaultUserOptions['usebetatoolbar-cgd'] = 1; + +# Release 1.21 removes the $wgWikiEditorToolbarClickTracking config variable +# and with it support for tracking clicks on WikiEditor features via the +# ClickTracking extension. diff --git a/WikiEditor.hooks.php b/WikiEditor.hooks.php index 682f7aa2..57b8ff35 100644 --- a/WikiEditor.hooks.php +++ b/WikiEditor.hooks.php @@ -29,9 +29,6 @@ class WikiEditorHooks { 'modules' => array( 'ext.wikiEditor.toolbar', ), - 'configurations' => array( - 'wgWikiEditorToolbarClickTracking', - ), ), 'dialogs' => array( 'preferences' => array( diff --git a/WikiEditor.php b/WikiEditor.php index cb2560ae..dc6df0a6 100644 --- a/WikiEditor.php +++ b/WikiEditor.php @@ -46,10 +46,6 @@ $wgWikiEditorFeatures = array( ); -// If set to true and the ClickTracking extension is installed, track clicks -// on the toolbar buttons -$wgWikiEditorToolbarClickTracking = false; - /* Setup */ $wgExtensionCredits['other'][] = array( diff --git a/modules/jquery.wikiEditor.toc.js b/modules/jquery.wikiEditor.toc.js index 5cfa900c..54b8a863 100644 --- a/modules/jquery.wikiEditor.toc.js +++ b/modules/jquery.wikiEditor.toc.js @@ -478,8 +478,6 @@ fn: { //$( this ).removeClass( 'current' ); setTimeout( function() { $.wikiEditor.modules.toc.fn.unhighlight( context ); }, 1000 ); - if ( typeof $.trackAction != 'undefined' ) - $.trackAction( 'ntoc.heading' ); event.preventDefault(); } ) .text( structure[i].text ); diff --git a/modules/jquery.wikiEditor.toolbar.js b/modules/jquery.wikiEditor.toolbar.js index 9024ba1d..07d0ea0e 100644 --- a/modules/jquery.wikiEditor.toolbar.js +++ b/modules/jquery.wikiEditor.toolbar.js @@ -236,28 +236,6 @@ fn: { * @param {Object} source */ doAction : function( context, action, source ) { - // Verify that this has been called from a source that's within the toolbar - // 'trackAction' defined in click tracking - if ( mw.config.get( 'wgWikiEditorToolbarClickTracking' ) && $.trackAction !== undefined && source.closest( '.wikiEditor-ui-toolbar' ).size() ) { - // Build a unique id for this action by tracking the parent rel attributes up to the toolbar level - var rels = []; - var step = source; - var i = 0; - while ( !step.hasClass( 'wikiEditor-ui-toolbar' ) ) { - if ( i > 25 ) { - break; - } - i++; - var rel = step.attr( 'rel' ); - if ( rel ) { - rels.push( step.attr( 'rel' ) ); - } - step = step.parent(); - } - rels.reverse(); - var id = rels.join( '.' ); - $.trackAction( id ); - } switch ( action.type ) { case 'replace': case 'encapsulate': @@ -461,10 +439,6 @@ fn: { $(this).attr( 'rel' ), { expires: 30, path: '/' } ); - // Click tracking - if ( mw.config.get( 'wgWikiEditorToolbarClickTracking' ) && $.trackAction !== undefined ) { - $.trackAction(section + '.' + $(this).attr('rel')); - } context.fn.restoreCursorAndScrollTop(); // No dragging! event.preventDefault(); @@ -655,10 +629,6 @@ fn: { context.fn.trigger( 'resize' ); } ); } - // Click tracking - if ( mw.config.get( 'wgWikiEditorToolbarClickTracking' ) && $.trackAction !== undefined ) { - $.trackAction( $section.attr('rel') + '.' + ( show ? 'show': 'hide' ) ); - } // Save the currently visible section $.cookie( 'wikiEditor-' + $(this).data( 'context' ).instance + '-toolbar-section',