jenkins-bot has submitted this change and it was merged. Change subject: Don't force a separate http request for ext.wikiEditor.init ......................................................................
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 --- M WikiEditor.php M extension.json 2 files changed, 7 insertions(+), 3 deletions(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/WikiEditor.php b/WikiEditor.php index 2d30c93..bd9906d 100644 --- a/WikiEditor.php +++ b/WikiEditor.php @@ -60,9 +60,11 @@ $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 @@ /* 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( diff --git a/extension.json b/extension.json index 257431c..e4382d8 100644 --- a/extension.json +++ b/extension.json @@ -340,7 +340,6 @@ ] }, "ext.wikiEditor.init": { - "group": "ext.wikiEditor", "scripts": "ext.wikiEditor.init.js" }, "ext.wikiEditor": { -- To view, visit https://gerrit.wikimedia.org/r/201004 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9e0ce994e632c64f3c781f45ea44582c0a943c65 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/WikiEditor Gerrit-Branch: master Gerrit-Owner: Krinkle <krinklem...@gmail.com> Gerrit-Reviewer: Alex Monk <kren...@gmail.com> Gerrit-Reviewer: Catrope <roan.katt...@gmail.com> Gerrit-Reviewer: Legoktm <legoktm.wikipe...@gmail.com> Gerrit-Reviewer: Ori.livneh <o...@wikimedia.org> Gerrit-Reviewer: TheDJ <hartman.w...@gmail.com> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits