]> git.armaanb.net Git - chorizo.git/commitdiff
Reactivate $LARIZA_USER_AGENT and use WebKit's default
authorPeter Hofmann <scm@uninformativ.de>
Sun, 9 Nov 2014 11:09:21 +0000 (12:09 +0100)
committerPeter Hofmann <scm@uninformativ.de>
Sun, 9 Nov 2014 11:09:21 +0000 (12:09 +0100)
README
browser.c

diff --git a/README b/README
index 9a3a63d9271bb9ffe516262499d0a6f08227796b..362956e8111f6c5772fc1e1a210de7da93765551 100644 (file)
--- a/README
+++ b/README
@@ -236,8 +236,8 @@ following environment variables:
         command line. Defaults to "about:blank".
 
     LARIZA_USER_AGENT
-        Lariza will identify itself with this string. See source code
-        for the default value.
+        Lariza will identify itself with this string. Uses WebKit's
+        default value if unset.
 
     LARIZA_ZOOM
         Zoom level for WebKit viewports. Defaults to 1.0.
index 9ee25e50f73f86c3a32a18e8b74ddf6584f3cd98..3ed7b7b0ff4792ea1bf89f7f32d56c5142653ad0 100644 (file)
--- a/browser.c
+++ b/browser.c
@@ -80,10 +80,7 @@ static gboolean language_is_set = FALSE;
 static gchar *search_text = NULL;
 static gboolean show_all_requests = FALSE;
 static gboolean tabbed_automagic = TRUE;
-static gchar *user_agent = "Mozilla/5.0 (X11; U; Unix; en-US) "
-                           "AppleWebKit/537.15 (KHTML, like Gecko) "
-                           "Chrome/24.0.1295.0 "
-                           "Safari/537.15 "__NAME_CAPITALIZED__"/git";
+static gchar *user_agent = NULL;
 
 
 void
@@ -199,10 +196,9 @@ client_new(const gchar *uri)
                language_is_set = TRUE;
        }
 
-       /*
-       g_object_set(G_OBJECT(webkit_web_view_get_settings(WEBKIT_WEB_VIEW(c->web_view))),
-                    "user-agent", user_agent, NULL);
-                                */
+       if (user_agent != NULL)
+               g_object_set(G_OBJECT(webkit_web_view_get_settings(WEBKIT_WEB_VIEW(c->web_view))),
+                            "user-agent", user_agent, NULL);
 
        c->scroll = gtk_scrolled_window_new(NULL, NULL);