From 4ac9fa081a7c045f6a9f1cfc529d82423f485b2e Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Sun, 8 Dec 2013 09:55:49 +0100 Subject: Update to MediaWiki 1.22.0 --- .../Vector/modules/ext.vector.sectionEditLinks.js | 66 ---------------------- 1 file changed, 66 deletions(-) delete mode 100644 extensions/Vector/modules/ext.vector.sectionEditLinks.js (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 deleted file mode 100644 index 62bde9e6..00000000 --- a/extensions/Vector/modules/ext.vector.sectionEditLinks.js +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Section Edit Links for Vector - */ -( function ( $, mw ) { - -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 ) ); - if ( currentExperiment === null || Number( currentExperiment ) != experiment ) { - $.cookie( cookieBase + 'experiment', experiment ); - } else { - bucket = $.cookie( cookieBase + 'bucket' ); - } - if ( bucket === null ) { - // Percentage chance of being tracked - var odds = Math.min( 100, Math.max( 0, - Number( mw.config.get( 'wgVectorSectionEditLinksLotteryOdds', 0 ) ) - ) ); - // 0 = not tracked, 1 = tracked with old version, 2 = tracked with new version - bucket = ( Math.random() * 100 ) < odds ? Number( Math.random() < 0.5 ) + 1 : 0; - $.cookie( cookieBase + 'bucket', bucket, { 'path': '/', 'expires': 30 } ); - // If we are going to track this person from now on, let's also track which bucket we put - // them into and when - if ( bucket > 0 && 'trackAction' in $ ) { - $.trackAction( eventBase + bucket + '@' + experiment ); - } - } -} - -if ( bucket <= 0 ) { - return; -} - -$(document).ready( function () { - if ( bucket == 2 ) { - // Move the link over to be next to the heading text and style it with an icon - $( 'span.mw-headline' ).each( function () { - $(this) - .after( - $( '' ) - .append( - $(this) - .prev( 'span.editsection' ) - .find( 'a' ) - .each( function () { - var text = $(this).text(); - $(this).text( - text.substr( 0, 1 ).toUpperCase() + text.substr( 1 ) - ); - } ) - .detach() - ) - ) - .prev( 'span.editsection' ) - .remove(); - } ); - } -} ); - -} )( jQuery, mediaWiki ); -- cgit v1.2.2