mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/WikiEditor
synced 2024-11-27 17:50:44 +00:00
Don't force a separate http request for ext.wikiEditor.init
Follows-up 74da530f2
, which introduced a separate HTTP request
on all pages just for the 665 bytes (compressed) of ext.wikiEditor.init.
Have it join the main load queue instead.
Change-Id: I9e0ce994e632c64f3c781f45ea44582c0a943c65
This commit is contained in:
parent
64bdcf3c40
commit
8e78850a3a
|
@ -60,9 +60,11 @@ $wgHooks['BeforePageDisplay'][] = 'WikiEditorHooks::onBeforePageDisplay';
|
|||
$wgHooks['EditPage::attemptSave'][] = 'WikiEditorHooks::editPageAttemptSave';
|
||||
$wgHooks['EditPage::attemptSave:after'][] = 'WikiEditorHooks::editPageAttemptSaveAfter';
|
||||
|
||||
$wikiEditorTpl = array(
|
||||
$wikiEditorBaseTpl = array(
|
||||
'localBasePath' => __DIR__ . '/modules',
|
||||
'remoteExtPath' => 'WikiEditor/modules',
|
||||
);
|
||||
$wikiEditorTpl = $wikiEditorBaseTpl + array(
|
||||
'group' => 'ext.wikiEditor',
|
||||
);
|
||||
|
||||
|
@ -362,7 +364,10 @@ $wgResourceModules += array(
|
|||
|
||||
/* WikiEditor Resources */
|
||||
|
||||
'ext.wikiEditor.init' => $wikiEditorTpl + array(
|
||||
'ext.wikiEditor.init' => $wikiEditorBaseTpl + array(
|
||||
// Use wikiEditorBaseTpl so that no group is specified.
|
||||
// The init module is loaded on all pages and would otherwise
|
||||
// require a separate http request.
|
||||
'scripts' => 'ext.wikiEditor.init.js'
|
||||
),
|
||||
'ext.wikiEditor' => $wikiEditorTpl + array(
|
||||
|
|
|
@ -340,7 +340,6 @@
|
|||
]
|
||||
},
|
||||
"ext.wikiEditor.init": {
|
||||
"group": "ext.wikiEditor",
|
||||
"scripts": "ext.wikiEditor.init.js"
|
||||
},
|
||||
"ext.wikiEditor": {
|
||||
|
|
Loading…
Reference in a new issue