mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/TemplateData
synced 2024-12-11 23:46:32 +00:00
822d0cd345
VisualEditorPluginModules loads whenever VE loads, so create a minimal loader page to check if we are in the template namespace before loading the rest of the TemplateData init code. Bug: T208765 Change-Id: Id127eb4a2472a6ce9da7672f9237b182cf6be2eb
14 lines
406 B
JavaScript
14 lines
406 B
JavaScript
/*!
|
|
* TemplateData Generator edit page init
|
|
*
|
|
* @author Moriel Schottlender
|
|
* @author Ed Sanders
|
|
*/
|
|
// We're on an edit page, but we don't know what namespace yet (e.g. when loaded by VisualEditorPluginModules)
|
|
if (
|
|
mw.config.get( 'wgCanonicalNamespace' ) === 'Template' &&
|
|
mw.config.get( 'wgPageContentModel' ) === 'wikitext'
|
|
) {
|
|
mw.loader.using( 'ext.templateDataGenerator.editTemplatePage' );
|
|
}
|