[epiphany] Revert "user-agent: restore application branding"



commit 3df4a7184203d601060980f819d04141ac03a3a2
Author: Michael Catanzaro <mcatanzaro redhat com>
Date:   Thu Jun 2 20:48:16 2022 -0500

    Revert "user-agent: restore application branding"
    
    This reverts commit 3e59a634a87baa8f8a77d63f4a4009433a96cbcb.
    
    It breaks id.spectrum.net, which shows an unsupported browser warning,
    even if I modify WebKit to place the application branding in the middle
    of the header instead of at the end. This is just the first such website
    of many. We're not going to be able to set application branding in
    general.
    
    If particular websites require a branding quirk, we'll have to do that
    in WebKit.

 lib/ephy-user-agent.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/lib/ephy-user-agent.c b/lib/ephy-user-agent.c
index 7803ad818..52cbc8282 100644
--- a/lib/ephy-user-agent.c
+++ b/lib/ephy-user-agent.c
@@ -31,6 +31,7 @@ ephy_user_agent_get (void)
 {
   static char *user_agent = NULL;
   WebKitSettings *settings;
+  gboolean web_app;
 
   if (user_agent)
     return user_agent;
@@ -42,9 +43,12 @@ ephy_user_agent_get (void)
     g_free (user_agent);
   }
 
+  web_app = ephy_profile_dir_is_web_application ();
+
   settings = webkit_settings_new ();
-  webkit_settings_set_user_agent_with_application_details (settings, "Epiphany", "605.1.15");
-  user_agent = g_strdup (webkit_settings_get_user_agent (settings));
+  user_agent = g_strdup_printf ("%s%s",
+                                webkit_settings_get_user_agent (settings),
+                                web_app ? " (Web App)" : "");
   g_object_unref (settings);
 
   return user_agent;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]