Skip window_object_cleared in non-http-frames
This commit is contained in:
parent
6e32883b68
commit
312d321ff9
4 changed files with 19 additions and 2 deletions
|
@ -926,9 +926,9 @@ adblock_window_object_cleared_cb (WebKitWebView* web_view,
|
|||
{
|
||||
const char *page_uri;
|
||||
|
||||
page_uri = webkit_web_view_get_uri (web_view);
|
||||
page_uri = webkit_web_frame_get_uri (web_frame);
|
||||
/* Don't add adblock css into speeddial and about: pages */
|
||||
if (midori_uri_is_blank (page_uri))
|
||||
if (!midori_uri_is_http (page_uri))
|
||||
return;
|
||||
|
||||
g_free (sokoke_js_script_eval (js_context, blockscript, NULL));
|
||||
|
|
|
@ -1471,6 +1471,11 @@ addons_context_ready_cb (WebKitWebView* web_view,
|
|||
GSList* scripts, *styles;
|
||||
struct AddonElement* script, *style;
|
||||
struct AddonsList* scripts_list, *styles_list;
|
||||
const gchar* page_uri;
|
||||
|
||||
page_uri = webkit_web_frame_get_uri (web_frame);
|
||||
if (!midori_uri_is_http (page_uri))
|
||||
return;
|
||||
|
||||
/* Not a main frame! Abort */
|
||||
if (web_frame != webkit_web_view_get_main_frame (web_view))
|
||||
|
|
|
@ -255,6 +255,12 @@ formhistory_window_object_cleared_cb (WebKitWebView* web_view,
|
|||
JSObjectRef js_window)
|
||||
{
|
||||
gchar* script;
|
||||
const gchar* page_uri;
|
||||
|
||||
page_uri = webkit_web_frame_get_uri (web_frame);
|
||||
if (!midori_uri_is_http (page_uri))
|
||||
return;
|
||||
|
||||
script = formhistory_build_js ();
|
||||
sokoke_js_script_eval (js_context, script, NULL);
|
||||
g_free (script);
|
||||
|
|
|
@ -2944,6 +2944,12 @@ webkit_web_view_window_object_cleared_cb (GtkWidget* web_view,
|
|||
JSObjectRef js_window,
|
||||
MidoriView* view)
|
||||
{
|
||||
const gchar* page_uri;
|
||||
|
||||
page_uri = webkit_web_frame_get_uri (web_frame);
|
||||
if (!midori_uri_is_http (page_uri))
|
||||
return;
|
||||
|
||||
if (katze_object_get_boolean (view->settings, "enable-private-browsing"))
|
||||
{
|
||||
/* Mask language, architecture, no plugin list */
|
||||
|
|
Loading…
Reference in a new issue