summaryrefslogtreecommitdiff
path: root/extensions/Vector/modules/ext.vector.sectionEditLinks.js
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2012-05-03 13:01:35 +0200
committerPierre Schmitz <pierre@archlinux.de>2012-05-03 13:01:35 +0200
commitd9022f63880ce039446fba8364f68e656b7bf4cb (patch)
tree16b40fbf17bf7c9ee6f4ead25b16dd192378050a /extensions/Vector/modules/ext.vector.sectionEditLinks.js
parent27cf83d177256813e2e802241085fce5dd0f3fb9 (diff)
Update to MediaWiki 1.19.0
Diffstat (limited to 'extensions/Vector/modules/ext.vector.sectionEditLinks.js')
-rw-r--r--extensions/Vector/modules/ext.vector.sectionEditLinks.js11
1 files changed, 8 insertions, 3 deletions
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 );