mediawiki-extensions-CodeMi.../resources/ve-cm/ve.ui.CodeMirror.init.js
MusikAnimal 5ff54cf7f6 ve.ui.CodeMirror.init: make cm6enable=1 query param work for 2017 editor
Change-Id: I13f31aca84ffd953de31d5ed18c658e9620f72a1
2024-09-04 18:28:02 -04:00

10 lines
307 B
JavaScript

require( '../ext.CodeMirror.data.js' );
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' );
}