[Xfce4-commits] <midori:master> Make internal link element search a truly anonymous function

Christian Dywan noreply at xfce.org
Mon Dec 7 22:34:01 CET 2009


Updating branch refs/heads/master
         to 4f5262df42111f4967e25a3d809f844f0b4771c2 (commit)
       from 88b720295f218487bd2ff855a3ad01d20b3899b9 (commit)

commit 4f5262df42111f4967e25a3d809f844f0b4771c2
Author: Christian Dywan <christian at twotoasts.de>
Date:   Mon Dec 7 22:31:43 2009 +0100

    Make internal link element search a truly anonymous function

 midori/midori-view.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/midori/midori-view.c b/midori/midori-view.c
index ac854a7..43137c3 100644
--- a/midori/midori-view.c
+++ b/midori/midori-view.c
@@ -1019,13 +1019,13 @@ webkit_web_view_load_finished_cb (WebKitWebView*  web_view,
            URI1|title1,URI2|title2
            FIXME: Ensure separators contained in the string can't break it */
         gchar* value = sokoke_js_script_eval (js_context,
-        "function links (l) { var f = new Array (); for (i in l) "
+        "(function (l) { var f = new Array (); for (i in l) "
         "{ var t = l[i].type; var r = l[i].rel; "
         "if (t && (t.indexOf ('rss') != -1 || t.indexOf ('atom') != -1)) "
         "f.push (l[i].href + '|' + l[i].title);"
         "else if (r && r.indexOf ('icon') != -1) f.push (l[i].href); } "
-        "return f; }"
-        "links (document.getElementsByTagName ('link'))", NULL);
+        "return f; })("
+        "document.getElementsByTagName ('link'));", NULL);
         gchar** items = g_strsplit (value, ",", 0);
         guint i = 0;
         gchar* default_uri = NULL;



More information about the Xfce4-commits mailing list