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
This commit is contained in:
Ori Livneh 2013-01-27 23:29:49 -08:00
parent d7e92a36a6
commit 61205be62a
5 changed files with 4 additions and 39 deletions

4
README
View file

@ -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.

View file

@ -29,9 +29,6 @@ class WikiEditorHooks {
'modules' => array(
'ext.wikiEditor.toolbar',
),
'configurations' => array(
'wgWikiEditorToolbarClickTracking',
),
),
'dialogs' => array(
'preferences' => array(

View file

@ -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(

View file

@ -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 );

View file

@ -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',