ve.ui.CodeMirror.init: make cm6enable=1 query param work for 2017 editor

Change-Id: I13f31aca84ffd953de31d5ed18c658e9620f72a1
This commit is contained in:
MusikAnimal 2024-09-04 18:27:21 -04:00
parent 021a4723d5
commit 5ff54cf7f6

View file

@ -1,6 +1,8 @@
require( '../ext.CodeMirror.data.js' ); require( '../ext.CodeMirror.data.js' );
if ( mw.config.get( 'extCodeMirrorConfig' ).useV6 ) { const urlParams = new URLSearchParams( window.location.search );
if ( mw.config.get( 'extCodeMirrorConfig' ).useV6 || urlParams.get( 'cm6enable' ) ) {
mw.loader.load( 'ext.CodeMirror.v6.visualEditor' ); mw.loader.load( 'ext.CodeMirror.v6.visualEditor' );
} else { } else {
mw.loader.load( 'ext.CodeMirror.visualEditor' ); mw.loader.load( 'ext.CodeMirror.visualEditor' );