Only run user scripts on the main frame

This commit is contained in:
Paweł Forysiuk 2011-09-10 19:36:04 +02:00 committed by Christian Dywan
parent 602d0e1366
commit 4cdc347287

View file

@ -1458,6 +1458,10 @@ addons_context_ready_cb (WebKitWebView* web_view,
struct AddonElement* script, *style;
struct AddonsList* scripts_list, *styles_list;
/* Not a main frame! Abort */
if (web_frame != webkit_web_view_get_main_frame (web_view))
return;
uri = katze_object_get_string (web_view, "uri");
/* Don't run scripts or styles on blank or special pages */
if (!(uri && *uri) || !strncmp (uri, "about:", 6))