From 73860b1d441dad4a2b0604b137fabde30971d38a Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 22 Apr 2021 14:27:27 +0100 Subject: [PATCH] Variable names --- webapp_timeline.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/webapp_timeline.py b/webapp_timeline.py index e8c5ecff8..2298dd019 100644 --- a/webapp_timeline.py +++ b/webapp_timeline.py @@ -479,9 +479,14 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str, menuNewswire: usersPath + '/newswiremobile', menuLinks: usersPath + '/linksmobile' } + navAccessKeys = {} + for variableName, key in accessKeys.items(): + if not locals().get(variableName): + continue + navAccessKeys[locals()[variableName]] = key if moderator: navLinks[menuModeration] = usersPath + '/moderation#modtimeline' - tlStr += htmlKeyboardNavigation(textModeBanner, navLinks, accessKeys, + tlStr += htmlKeyboardNavigation(textModeBanner, navLinks, navAccessKeys, None, usersPath, translate, followApprovals)