From 7077fedcbd1229cfd0456f568a8a4ba53aa3553d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Dziewo=C5=84ski?= Date: Fri, 27 Jan 2023 15:49:46 +0100 Subject: [PATCH] Enable sticky header on all talk pages Bug: T328133 Change-Id: Ib72d7aa9334bdb67a11dc0220eb731d94f050243 --- resources/skins.vector.es6/stickyHeader.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/resources/skins.vector.es6/stickyHeader.js b/resources/skins.vector.es6/stickyHeader.js index de605ecce..887387354 100644 --- a/resources/skins.vector.es6/stickyHeader.js +++ b/resources/skins.vector.es6/stickyHeader.js @@ -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; } /**