mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-09-25 11:16:51 +00:00
Disable change marking by default
It's causing problems with Parsoid in production Change-Id: Id47493baafe1ec7f7c0e2bbdb2ea60a82913dfaf
This commit is contained in:
parent
b77f1a368f
commit
3acc6cb8f4
|
@ -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 )
|
||||
|
|
|
@ -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.
|
||||
*
|
||||
|
|
|
@ -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.
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue