2020-06-30 15:21:33 +00:00
|
|
|
mw.loader.using( 'ext.visualEditor.targetLoader' ).then( function () {
|
2018-04-18 17:51:19 +00:00
|
|
|
mw.libs.ve.targetLoader.addPlugin( function () {
|
2021-06-15 14:50:09 +00:00
|
|
|
var target = ve.init.mw.DesktopArticleTarget;
|
2018-05-12 12:07:52 +00:00
|
|
|
if ( target ) {
|
2023-02-15 01:30:33 +00:00
|
|
|
var groups = target.static.toolbarGroups.concat( target.static.actionGroups );
|
|
|
|
groups.some( function ( group ) {
|
|
|
|
if ( group.name === 'pageMenu' ) {
|
|
|
|
var index = group.include.indexOf( 'changeDirectionality' );
|
|
|
|
group.include.splice( index, 0, 'codeMirror' );
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
} );
|
2018-04-18 17:51:19 +00:00
|
|
|
}
|
|
|
|
} );
|
2020-06-30 15:21:33 +00:00
|
|
|
} );
|