mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-27 15:50:29 +00:00
DesktopArticleTarget: Make the waiting module list extensible
So that GlobalCssJs and other extensions can hook in. Bug: T156899 Change-Id: I045c7b045ce28047298b28a05e77ef27749c1ee1
This commit is contained in:
parent
fc332c69e7
commit
217640624a
|
@ -699,6 +699,7 @@ class VisualEditorHooks {
|
|||
|
||||
$vars['wgVisualEditorConfig'] = [
|
||||
'disableForAnons' => $veConfig->get( 'VisualEditorDisableForAnons' ),
|
||||
'preloadModules' => $veConfig->get( 'VisualEditorPreloadModules' ),
|
||||
'preferenceModules' => $veConfig->get( 'VisualEditorPreferenceModules' ),
|
||||
'namespaces' => $availableNamespaces,
|
||||
'contentModels' => $availableContentModels,
|
||||
|
|
|
@ -27,6 +27,10 @@
|
|||
"VisualEditorPreferenceModules": {
|
||||
"visualeditor-enable-experimental": "ext.visualEditor.experimental"
|
||||
},
|
||||
"VisualEditorPreloadModules": [
|
||||
"site",
|
||||
"user"
|
||||
],
|
||||
"VisualEditorRestbaseURL": false,
|
||||
"VisualEditorFullRestbaseURL": false,
|
||||
"VisualEditorFeedbackAPIURL": false,
|
||||
|
|
|
@ -127,10 +127,9 @@
|
|||
targetPromise = mw.loader.using( 'ext.visualEditor.targetLoader' )
|
||||
.then( function () {
|
||||
mw.libs.ve.targetLoader.addPlugin( function () {
|
||||
// If the user and site modules fail, we still want to continue
|
||||
// Run VisualEditorPreloadModules, but if they fail, we still want to continue
|
||||
// loading, so convert failure to success
|
||||
|
||||
return mw.loader.using( [ 'user', 'site' ] ).then(
|
||||
return mw.loader.using( conf.preloadModules ).then(
|
||||
null,
|
||||
function () {
|
||||
return $.Deferred().resolve();
|
||||
|
|
Loading…
Reference in a new issue