Merge "Allow a global variable to forcible enable edit check"

This commit is contained in:
jenkins-bot 2023-12-01 13:00:52 +00:00 committed by Gerrit Code Review
commit 82e6bc5fa0
2 changed files with 3 additions and 2 deletions

View file

@ -176,7 +176,8 @@ if ( mw.config.get( 'wgVisualEditorConfig' ).editCheckTagging ) {
if (
( mw.config.get( 'wgVisualEditorConfig' ).editCheck && mw.editcheck.accountShouldSeeEditCheck( mw.editcheck.config.addReference ) ) ||
// ecenable will bypass normal account-status checks as well:
new URL( location.href ).searchParams.get( 'ecenable' )
new URL( location.href ).searchParams.get( 'ecenable' ) ||
!!window.MWVE_FORCE_EDIT_CHECK_ENABLED
) {
var saveProcessDeferred;
mw.hook( 've.preSaveProcess' ).add( function ( saveProcess, target ) {

View file

@ -37,7 +37,7 @@
modules.push( 'ext.visualEditor.mwwikitext' );
}
var editCheck = conf.editCheck || !!url.searchParams.get( 'ecenable' );
var editCheck = conf.editCheck || !!url.searchParams.get( 'ecenable' ) || !!window.MWVE_FORCE_EDIT_CHECK_ENABLED;
if ( conf.editCheckTagging || editCheck ) {
modules.push( 'ext.visualEditor.editCheck' );
}