mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-27 09:43:30 +00:00
Use Array#push instead of Array#concat
Change-Id: I605e726fce1cf1acf39ffdcfe8c7cd51c032a372
This commit is contained in:
parent
ea5639b20b
commit
177639f5be
|
@ -251,22 +251,24 @@ function getCheckboxesPromise( pageName, oldId ) {
|
|||
* @return {string[]}
|
||||
*/
|
||||
function getReplyWidgetModules() {
|
||||
const veConf = mw.config.get( 'wgVisualEditorConfig' );
|
||||
let modules = [ 'ext.discussionTools.ReplyWidget' ]
|
||||
.concat( veConf.pluginModules.filter( mw.loader.getState ) );
|
||||
|
||||
const modules = [];
|
||||
if ( OO.ui.isMobile() ) {
|
||||
modules = [
|
||||
modules.push(
|
||||
'ext.visualEditor.core.mobile',
|
||||
'ext.visualEditor.mwextensions'
|
||||
].concat( modules );
|
||||
);
|
||||
} else {
|
||||
modules = [
|
||||
modules.push(
|
||||
'ext.visualEditor.core.desktop',
|
||||
'ext.visualEditor.desktopTarget',
|
||||
'ext.visualEditor.mwextensions.desktop'
|
||||
].concat( modules );
|
||||
);
|
||||
}
|
||||
modules.push( 'ext.discussionTools.ReplyWidget' );
|
||||
|
||||
const veConf = mw.config.get( 'wgVisualEditorConfig' );
|
||||
modules.push( ...veConf.pluginModules.filter( mw.loader.getState ) );
|
||||
|
||||
return modules;
|
||||
}
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ require( './CommentTarget.js' );
|
|||
* @param {Object} [config] Configuration options
|
||||
*/
|
||||
function CommentTargetWidget( replyWidget, config ) {
|
||||
let excludeCommands = [
|
||||
const excludeCommands = [
|
||||
'blockquoteWrap', // T258194
|
||||
// Disable to allow Tab/Shift+Tab to move focus out of the widget (T172694)
|
||||
'indent',
|
||||
|
@ -26,7 +26,7 @@ function CommentTargetWidget( replyWidget, config ) {
|
|||
];
|
||||
|
||||
if ( !replyWidget.isNewTopic ) {
|
||||
excludeCommands = excludeCommands.concat( [
|
||||
excludeCommands.push(
|
||||
// Disable commands for things whose wikitext markup doesn't work when indented
|
||||
'heading1',
|
||||
'heading2',
|
||||
|
@ -37,10 +37,10 @@ function CommentTargetWidget( replyWidget, config ) {
|
|||
'insertTable',
|
||||
'transclusionFromSequence', // T253667
|
||||
'preformatted'
|
||||
] );
|
||||
);
|
||||
}
|
||||
|
||||
config = Object.assign( {}, {
|
||||
config = Object.assign( {
|
||||
excludeCommands: excludeCommands
|
||||
}, config );
|
||||
|
||||
|
|
Loading…
Reference in a new issue