Index: trunk/extensions/WikiEditor/WikiEditor.php |
— | — | @@ -46,6 +46,10 @@ |
47 | 47 | |
48 | 48 | ); |
49 | 49 | |
| 50 | +// If set to true and the ClickTracking extension is installed, track clicks |
| 51 | +// on the toolbar buttons |
| 52 | +$wgWikiEditorToolbarClickTracking = false; |
| 53 | + |
50 | 54 | /* Setup */ |
51 | 55 | |
52 | 56 | $wgExtensionCredits['other'][] = array( |
Index: trunk/extensions/WikiEditor/WikiEditor.hooks.php |
— | — | @@ -29,6 +29,9 @@ |
30 | 30 | 'modules' => array( |
31 | 31 | 'ext.wikiEditor.toolbar', |
32 | 32 | ), |
| 33 | + 'configurations' => array( |
| 34 | + 'wgWikiEditorToolbarClickTracking', |
| 35 | + ), |
33 | 36 | ), |
34 | 37 | 'dialogs' => array( |
35 | 38 | 'preferences' => array( |
Index: trunk/extensions/WikiEditor/modules/jquery.wikiEditor.toolbar.js |
— | — | @@ -238,7 +238,7 @@ |
239 | 239 | doAction : function( context, action, source ) { |
240 | 240 | // Verify that this has been called from a source that's within the toolbar |
241 | 241 | // 'trackAction' defined in click tracking |
242 | | - if ( $.trackAction !== undefined && source.closest( '.wikiEditor-ui-toolbar' ).size() ) { |
| 242 | + if ( mw.config.get( 'wgWikiEditorToolbarClickTracking' ) && $.trackAction !== undefined && source.closest( '.wikiEditor-ui-toolbar' ).size() ) { |
243 | 243 | // Build a unique id for this action by tracking the parent rel attributes up to the toolbar level |
244 | 244 | var rels = []; |
245 | 245 | var step = source; |
— | — | @@ -461,7 +461,7 @@ |
462 | 462 | { expires: 30, path: '/' } |
463 | 463 | ); |
464 | 464 | // Click tracking |
465 | | - if ( $.trackAction !== undefined){ |
| 465 | + if ( mw.config.get( 'wgWikiEditorToolbarClickTracking' ) && $.trackAction !== undefined ) { |
466 | 466 | $.trackAction(section + '.' + $(this).attr('rel')); |
467 | 467 | } |
468 | 468 | context.fn.restoreCursorAndScrollTop(); |
— | — | @@ -640,7 +640,7 @@ |
641 | 641 | } ); |
642 | 642 | } |
643 | 643 | // Click tracking |
644 | | - if ( $.trackAction !== undefined ) { |
| 644 | + if ( mw.config.get( 'wgWikiEditorToolbarClickTracking' ) && $.trackAction !== undefined ) { |
645 | 645 | $.trackAction( $section.attr('rel') + '.' + ( show ? 'show': 'hide' ) ); |
646 | 646 | } |
647 | 647 | // Save the currently visible section |