[Xfce4-commits] <midori:master> Only run user scripts on the main frame

Christian Dywan noreply at xfce.org
Wed Sep 14 02:46:10 CEST 2011


Updating branch refs/heads/master
         to 4cdc347287a5d7e429ef34c5676e673e9018ea38 (commit)
       from 602d0e13667de8828abbc075d7e1365ac7985356 (commit)

commit 4cdc347287a5d7e429ef34c5676e673e9018ea38
Author: Paweł Forysiuk <tuxator at o2.pl>
Date:   Sat Sep 10 19:36:04 2011 +0200

    Only run user scripts on the main frame

 extensions/addons.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/extensions/addons.c b/extensions/addons.c
index 2916ea8..b2fb620 100644
--- a/extensions/addons.c
+++ b/extensions/addons.c
@@ -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))


More information about the Xfce4-commits mailing list