g_set_application_name (_("Midori (Private Browsing)"));
if (!config && !webapp)
config = g_build_filename (g_get_user_config_dir (), PACKAGE_NAME, NULL);
+ /* Mask the timezone, which can be read by Javascript */
+ g_setenv ("TZ", "UTC", TRUE);
}
else
g_set_application_name (_("Midori"));
if (private)
{
g_object_set (settings,
+ "preferred-languages", "en",
#if WEBKIT_CHECK_VERSION (1, 1, 2)
"enable-private-browsing", TRUE,
#endif
JSObjectRef js_window,
MidoriView* view)
{
+ #if WEBKIT_CHECK_VERSION (1, 1, 2)
+ if (katze_object_get_boolean (view->settings, "enable-private-browsing"))
+ {
+ /* Mask language, architecture, no plugin list */
+ gchar* result = sokoke_js_script_eval (js_context,
+ "navigator = { 'appName': 'Netscape',"
+ "'appCodeName': 'Mozilla',"
+ "'appVersion': '5.0 (X11)',"
+ "'userAgent': navigator.userAgent,"
+ "'language': 'en-US',"
+ "'platform': 'Linux i686',"
+ "'cookieEnabled': true,"
+ "'plugins': {'refresh': function () { } } };",
+ NULL);
+ g_free (result);
+ }
+ #endif
+
g_signal_emit (view, signals[CONTEXT_READY], 0, js_context);
}