https://www.mediawiki.org/wiki/Special:Code/MediaWiki/111985

Revision: 111985
Author:   tstarling
Date:     2012-02-21 00:00:18 +0000 (Tue, 21 Feb 2012)
Log Message:
-----------
* Fixed load order like bug 34538
* Fixed accidental global variable reference in the case where the 
configuration variable is false. Returned early instead of adding another 
indent level, so that the diff is easier to interpret.
* Untested.

Modified Paths:
--------------
    trunk/extensions/Vector/modules/ext.vector.sectionEditLinks.js

Modified: trunk/extensions/Vector/modules/ext.vector.sectionEditLinks.js
===================================================================
--- trunk/extensions/Vector/modules/ext.vector.sectionEditLinks.js      
2012-02-20 23:47:47 UTC (rev 111984)
+++ trunk/extensions/Vector/modules/ext.vector.sectionEditLinks.js      
2012-02-21 00:00:18 UTC (rev 111985)
@@ -5,13 +5,13 @@
 
 var eventBase = 'ext.vector.sectionEditLinks-bucket:';
 var cookieBase = 'ext.vector.sectionEditLinks-';
+var bucket = null;
 
 if ( mw.config.get( 'wgVectorSectionEditLinksBucketTest', false ) ) {
        // If the version in the client's cookie doesn't match 
wgVectorSectionEditLinksExperiment, then
        // we need to disregard the bucket they may already be in to ensure 
accurate redistribution
        var currentExperiment = $.cookie( cookieBase + 'experiment' );
        var experiment = Number( mw.config.get( 
'wgVectorSectionEditLinksExperiment', 0 ) );
-       var bucket = null;
        if ( currentExperiment === null || Number( currentExperiment ) != 
experiment ) {
                $.cookie( cookieBase + 'experiment', experiment );
        } else {
@@ -32,7 +32,12 @@
                }
        }
 }
-if ( bucket > 0 ) {
+
+if ( bucket <= 0 ) {
+       return;
+}
+
+$(document).ready( function() {
        // Transform the targets of section edit links to route through the 
click tracking API
        var session = $.cookie( 'clicktracking-session' );
        $( 'span.editsection a, #ca-edit a' ).each( function() {
@@ -70,6 +75,6 @@
                                        .remove();
                } );
        }
-}
+} );
 
 } )( jQuery, mediaWiki );


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

Reply via email to