Index: trunk/extensions/Vector/modules/ext.vector.sectionEditLinks.js |
— | — | @@ -5,13 +5,13 @@ |
6 | 6 | |
7 | 7 | var eventBase = 'ext.vector.sectionEditLinks-bucket:'; |
8 | 8 | var cookieBase = 'ext.vector.sectionEditLinks-'; |
| 9 | +var bucket = null; |
9 | 10 | |
10 | 11 | if ( mw.config.get( 'wgVectorSectionEditLinksBucketTest', false ) ) { |
11 | 12 | // If the version in the client's cookie doesn't match wgVectorSectionEditLinksExperiment, then |
12 | 13 | // we need to disregard the bucket they may already be in to ensure accurate redistribution |
13 | 14 | var currentExperiment = $.cookie( cookieBase + 'experiment' ); |
14 | 15 | var experiment = Number( mw.config.get( 'wgVectorSectionEditLinksExperiment', 0 ) ); |
15 | | - var bucket = null; |
16 | 16 | if ( currentExperiment === null || Number( currentExperiment ) != experiment ) { |
17 | 17 | $.cookie( cookieBase + 'experiment', experiment ); |
18 | 18 | } else { |
— | — | @@ -32,7 +32,12 @@ |
33 | 33 | } |
34 | 34 | } |
35 | 35 | } |
36 | | -if ( bucket > 0 ) { |
| 36 | + |
| 37 | +if ( bucket <= 0 ) { |
| 38 | + return; |
| 39 | +} |
| 40 | + |
| 41 | +$(document).ready( function() { |
37 | 42 | // Transform the targets of section edit links to route through the click tracking API |
38 | 43 | var session = $.cookie( 'clicktracking-session' ); |
39 | 44 | $( 'span.editsection a, #ca-edit a' ).each( function() { |
— | — | @@ -70,6 +75,6 @@ |
71 | 76 | .remove(); |
72 | 77 | } ); |
73 | 78 | } |
74 | | -} |
| 79 | +} ); |
75 | 80 | |
76 | 81 | } )( jQuery, mediaWiki ); |