Enable sticky header on all talk pages

Bug: T328133
Change-Id: Ib72d7aa9334bdb67a11dc0220eb731d94f050243
This commit is contained in:
Bartosz Dziewoński 2023-01-27 15:49:46 +01:00
parent c4c79b557a
commit 7077fedcbd

View file

@ -503,10 +503,11 @@ function setupSearchIfNeeded( header ) {
* @return {boolean}
*/
function isAllowedNamespace( namespaceNumber ) {
// Corresponds to Main, Main talk, User, User talk, Wikipedia,
// Template, Help, Category, Portal, Module.
const allowedNamespaceNumbers = [ 0, 1, 2, 3, 4, 10, 12, 14, 100, 828 ];
return allowedNamespaceNumbers.indexOf( namespaceNumber ) > -1;
// Corresponds to Main, User, Wikipedia, Template, Help, Category, Portal, Module.
const allowedNamespaceNumbers = [ 0, 2, 4, 10, 12, 14, 100, 828 ];
// Also allow on all talk namespaces (compare NamespaceInfo::isTalk()).
const isAllowedTalk = namespaceNumber > 0 && namespaceNumber % 2 !== 0;
return isAllowedTalk || allowedNamespaceNumbers.indexOf( namespaceNumber ) > -1;
}
/**