mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CodeMirror
synced 2024-12-15 07:21:32 +00:00
f5210867ba
Bug: T173480 Change-Id: I2ca5a33f09aefe0c3d31082270869a13cee14fc4
15 lines
474 B
JavaScript
15 lines
474 B
JavaScript
( function ( ve, mw ) {
|
|
if ( mw.config.get( 'wgCodeMirrorEnabled' ) ) {
|
|
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 ) );
|