From 3d87e3a86bcb39d444ef916129dd48bf80b5bb31 Mon Sep 17 00:00:00 2001 From: "This, that and the other" Date: Fri, 29 Nov 2013 21:19:58 +1100 Subject: [PATCH] Add JavaScript variable wgContentNamespaces Intended to be used in WikiEditor to hide the signature button in content namespaces. Other uses could be for gadgets or extensions that only need to work on content pages, or that are internally-facing and should only be seen on non-content pages. It is an array of namespace IDs, so that end-users can quickly check whether wgNamespaceNumber is in this array. Change-Id: I01d9671dd14aa79e79ed887299c2f5de766f7375 --- includes/resourceloader/ResourceLoaderStartUpModule.php | 1 + 1 file changed, 1 insertion(+) diff --git a/includes/resourceloader/ResourceLoaderStartUpModule.php b/includes/resourceloader/ResourceLoaderStartUpModule.php index b38f4481e0..93c5d1b99b 100644 --- a/includes/resourceloader/ResourceLoaderStartUpModule.php +++ b/includes/resourceloader/ResourceLoaderStartUpModule.php @@ -84,6 +84,7 @@ class ResourceLoaderStartUpModule extends ResourceLoaderModule { 'wgMainPageTitle' => $mainPage->getPrefixedText(), 'wgFormattedNamespaces' => $wgContLang->getFormattedNamespaces(), 'wgNamespaceIds' => $namespaceIds, + 'wgContentNamespaces' => MWNamespace::getContentNamespaces(), 'wgSiteName' => $wgSitename, 'wgFileExtensions' => array_values( array_unique( $wgFileExtensions ) ), 'wgDBname' => $wgDBname, -- 2.20.1