Disable change marking by default

It's causing problems with Parsoid in production

Change-Id: Id47493baafe1ec7f7c0e2bbdb2ea60a82913dfaf
This commit is contained in:
Catrope 2012-11-14 11:58:32 -08:00
parent b77f1a368f
commit 3acc6cb8f4
3 changed files with 28 additions and 1 deletions

View file

@ -123,7 +123,8 @@ ve.dm.Converter.prototype.getDomElementFromDataElement = function ( dataElement
// Change markers
if (
dataElement.internal && dataElement.internal.changed &&
!ve.isEmptyObject( dataElement.internal.changed )
!ve.isEmptyObject( dataElement.internal.changed ) &&
ve.init.platform.useChangeMarkers()
) {
domElement.setAttribute( 'data-ve-changed',
JSON.stringify( dataElement.internal.changed )

View file

@ -53,6 +53,22 @@ ve.init.mw.Platform.prototype.getModulesUrl = function () {
return this.modulesUrl;
};
/**
* Whether to use change markers.
*
* Uses the vechangemarkers query string variable.
*
* @method
* @return {Boolean}
*/
ve.init.mw.Platform.prototype.useChangeMarkers = function () {
var currentUri = new mw.Uri( window.location.toString() );
if ( currentUri && 'vechangemarkers' in currentUri.query ) {
return true;
}
return false;
};
/**
* Adds multiple messages to the localization system.
*

View file

@ -46,6 +46,16 @@ ve.init.Platform.prototype.getModulesUrl = function () {
throw new Error( 've.init.Platform.getModulesUrl must be overridden in subclass' );
};
/**
* Whether to use change markers
*
* @method
* @returns {Boolean}
*/
ve.init.Platform.prototype.useChangeMarkers = function () {
return true;
};
/**
* Adds multiple messages to the localization system.
*