From 5ff54cf7f6b0c72181b1c1d6c556565842268aee Mon Sep 17 00:00:00 2001 From: MusikAnimal Date: Wed, 4 Sep 2024 18:27:21 -0400 Subject: [PATCH] ve.ui.CodeMirror.init: make cm6enable=1 query param work for 2017 editor Change-Id: I13f31aca84ffd953de31d5ed18c658e9620f72a1 --- resources/ve-cm/ve.ui.CodeMirror.init.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/resources/ve-cm/ve.ui.CodeMirror.init.js b/resources/ve-cm/ve.ui.CodeMirror.init.js index e87c03d5..eb41aa36 100644 --- a/resources/ve-cm/ve.ui.CodeMirror.init.js +++ b/resources/ve-cm/ve.ui.CodeMirror.init.js @@ -1,6 +1,8 @@ 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' ); } else { mw.loader.load( 'ext.CodeMirror.visualEditor' );