jenkins-bot has submitted this change and it was merged.

Change subject: Remove ClickTracking calls
......................................................................


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
---
M README
M WikiEditor.hooks.php
M WikiEditor.php
M modules/jquery.wikiEditor.toc.js
M modules/jquery.wikiEditor.toolbar.js
5 files changed, 4 insertions(+), 39 deletions(-)

Approvals:
  Mattflaschen: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/README b/README
index 2851211..6c6a77c 100644
--- a/README
+++ b/README
@@ -15,3 +15,7 @@
 
 $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 682f7aa..57b8ff3 100644
--- a/WikiEditor.hooks.php
+++ b/WikiEditor.hooks.php
@@ -29,9 +29,6 @@
                        'modules' => array(
                                'ext.wikiEditor.toolbar',
                        ),
-                       'configurations' => array(
-                               'wgWikiEditorToolbarClickTracking',
-                       ),
                ),
                'dialogs' => array(
                        'preferences' => array(
diff --git a/WikiEditor.php b/WikiEditor.php
index cb2560a..dc6df0a 100644
--- a/WikiEditor.php
+++ b/WikiEditor.php
@@ -46,10 +46,6 @@
 
 );
 
-// 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 5cfa900..54b8a86 100644
--- a/modules/jquery.wikiEditor.toc.js
+++ b/modules/jquery.wikiEditor.toc.js
@@ -478,8 +478,6 @@
                                                //$( 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 9024ba1..07d0ea0 100644
--- a/modules/jquery.wikiEditor.toolbar.js
+++ b/modules/jquery.wikiEditor.toolbar.js
@@ -236,28 +236,6 @@
         * @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 @@
                                        $(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();
@@ -654,10 +628,6 @@
                                                                $(this).css( { 
'overflow': 'visible', 'height': 0 } );
                                                                
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(

-- 
To view, visit https://gerrit.wikimedia.org/r/46206
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I71ea8c174e5e38b28f128ccd380ed2a25ad50606
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/WikiEditor
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh <[email protected]>
Gerrit-Reviewer: Krinkle <[email protected]>
Gerrit-Reviewer: Mattflaschen <[email protected]>
Gerrit-Reviewer: Ori.livneh <[email protected]>
Gerrit-Reviewer: Reedy <[email protected]>
Gerrit-Reviewer: Spage <[email protected]>
Gerrit-Reviewer: Trevor Parscal <[email protected]>
Gerrit-Reviewer: jenkins-bot
Gerrit-Reviewer: preilly <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to