From d0d63f3bc18b47e76895a2e8d3510a4971050af2 Mon Sep 17 00:00:00 2001 From: Chad Birch Date: Sun, 4 Oct 2015 22:21:20 -0600 Subject: [PATCH] OAuth authorization page: hide mobile web banner This is confusing when someone's trying to authorize a third-party app. --- r2/r2/lib/pages/pages.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/r2/r2/lib/pages/pages.py b/r2/r2/lib/pages/pages.py index 391930b89..7febad60c 100644 --- a/r2/r2/lib/pages/pages.py +++ b/r2/r2/lib/pages/pages.py @@ -333,7 +333,8 @@ class Reddit(Templated): if getattr(self, "show_newsletterbar", True): self.newsletterbar = NewsletterBar() - if c.render_style == "compact": + if (c.render_style == "compact" and + getattr(self, "show_mobilewebredirectbar", True)): self.mobilewebredirectbar = MobileWebRedirectBar() show_locationbar &= not c.user.pref_hide_locationbar @@ -1393,6 +1394,8 @@ class RegistrationInfo(Templated): class OAuth2AuthorizationPage(BoringPage): + show_mobilewebredirectbar = False + def __init__(self, client, redirect_uri, scope, state, duration, response_type): if duration == "permanent":