From d9022f63880ce039446fba8364f68e656b7bf4cb Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Thu, 3 May 2012 13:01:35 +0200 Subject: Update to MediaWiki 1.19.0 --- extensions/Vector/modules/ext.vector.sectionEditLinks.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'extensions/Vector/modules/ext.vector.sectionEditLinks.js') diff --git a/extensions/Vector/modules/ext.vector.sectionEditLinks.js b/extensions/Vector/modules/ext.vector.sectionEditLinks.js index 94a154e9..b8e2f601 100644 --- a/extensions/Vector/modules/ext.vector.sectionEditLinks.js +++ b/extensions/Vector/modules/ext.vector.sectionEditLinks.js @@ -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 ( mw.config.get( 'wgVectorSectionEditLinksBucketTest', false ) ) { } } } -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 @@ if ( bucket > 0 ) { .remove(); } ); } -} +} ); } )( jQuery, mediaWiki ); -- cgit v1.2.3-54-g00ecf