From 448905015cfee1fe6300fbfc52101be87aa29518 Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Thu, 21 Jun 2012 17:23:12 +0200 Subject: [PATCH] Add Chrome as an identification option --- midori/midori-websettings.c | 5 +++++ midori/midori-websettings.h | 1 + 2 files changed, 6 insertions(+) diff --git a/midori/midori-websettings.c b/midori/midori-websettings.c index 11dc999f..650a5f33 100644 --- a/midori/midori-websettings.c +++ b/midori/midori-websettings.c @@ -311,6 +311,7 @@ midori_identity_get_type (void) static const GEnumValue values[] = { { MIDORI_IDENT_MIDORI, "MIDORI_IDENT_MIDORI", N_("_Automatic") }, { MIDORI_IDENT_GENUINE, "MIDORI_IDENT_GENUINE", N_("Midori") }, + { MIDORI_IDENT_CHROME, "MIDORI_IDENT_CHROME", N_("Chrome") }, { MIDORI_IDENT_SAFARI, "MIDORI_IDENT_SAFARI", N_("Safari") }, { MIDORI_IDENT_IPHONE, "MIDORI_IDENT_IPHONE", N_("iPhone") }, { MIDORI_IDENT_FIREFOX, "MIDORI_IDENT_FIREFOX", N_("Firefox") }, @@ -1434,6 +1435,10 @@ generate_ident_string (MidoriWebSettings* web_settings, case MIDORI_IDENT_GENUINE: return g_strdup_printf ("Mozilla/5.0 (%s %s) AppleWebKit/%d.%d+ %s", platform, os, webcore_major, webcore_minor, appname); + case MIDORI_IDENT_CHROME: + return g_strdup_printf ("Mozilla/5.0 (%s %s) AppleWebKit/%d.%d " + "(KHTML, like Gecko) Chrome/18.0.1025.133 Safari/%d.%d %s", + platform, os, webcore_major, webcore_minor, webcore_major, webcore_minor, appname); case MIDORI_IDENT_MIDORI: case MIDORI_IDENT_SAFARI: g_object_set (web_settings, "enable-site-specific-quirks", TRUE, NULL); diff --git a/midori/midori-websettings.h b/midori/midori-websettings.h index 08dc876e..05db9710 100644 --- a/midori/midori-websettings.h +++ b/midori/midori-websettings.h @@ -142,6 +142,7 @@ typedef enum { MIDORI_IDENT_MIDORI /* Automatic */, MIDORI_IDENT_GENUINE /* Midori */, + MIDORI_IDENT_CHROME, MIDORI_IDENT_SAFARI, MIDORI_IDENT_IPHONE, MIDORI_IDENT_FIREFOX,