From: Christian Dywan Date: Thu, 21 Jun 2012 15:23:12 +0000 (+0200) Subject: Add Chrome as an identification option X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=448905015cfee1fe6300fbfc52101be87aa29518;p=midori Add Chrome as an identification option --- 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,