mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CodeMirror
synced 2024-11-15 10:19:27 +00:00
7c848abd8d
This patch makes Codemirror on VE independent of the beta feature, making it always load. This is a first step to graduating CodeMirror out of beta. Bug: T191923 Change-Id: Ide794e8f986d3f0455ff282819c71d9144dd75db
13 lines
412 B
JavaScript
13 lines
412 B
JavaScript
( function ( ve, mw ) {
|
|
mw.libs.ve.targetLoader.addPlugin( function () {
|
|
var i, target, index;
|
|
for ( i in ve.init.mw ) {
|
|
target = ve.init.mw[ i ];
|
|
if ( target === ve.init.mw.DesktopArticleTarget ) {
|
|
index = target.static.actionGroups[ 1 ].include.indexOf( 'changeDirectionality' );
|
|
target.static.actionGroups[ 1 ].include.splice( index, 0, 'codeMirror' );
|
|
}
|
|
}
|
|
} );
|
|
}( ve, mediaWiki ) );
|