[Xfce4-commits] <midori:master> Check if typed link number exists and check result

Christian Dywan noreply at xfce.org
Sat Jan 1 19:26:01 CET 2011


Updating branch refs/heads/master
         to 6b38ed85cfb6cb1e4681e0400741e074cc88d732 (commit)
       from e96ac0fabc6fd747dba589193782ebc39cc2cfdd (commit)

commit 6b38ed85cfb6cb1e4681e0400741e074cc88d732
Author: Christian Dywan <christian at twotoasts.de>
Date:   Sat Jan 1 19:03:00 2011 +0100

    Check if typed link number exists and check result

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

diff --git a/midori/midori-view.c b/midori/midori-view.c
index 7f4a949..fad15bf 100644
--- a/midori/midori-view.c
+++ b/midori/midori-view.c
@@ -1861,10 +1861,11 @@ gtk_widget_key_press_event_cb (WebKitWebView* web_view,
                 "if (return_key || typeof links[i * 10] == 'undefined') {"
                 "    for (var j = 0; j < links.length; j++)"
                 "        links[j].style.display = 'none !important';"
-                "    links[i].parentNode.href; }",
+                "    if (typeof links[i] != 'undefined')"
+                "        links[i].parentNode.href; }",
                 view->find_links, event->keyval == GDK_Return);
             result = sokoke_js_script_eval (js_context, script, NULL);
-            if (strcmp (result, "undefined"))
+            if (result && strstr (result, "://"))
             {
                 view->find_links = -1;
                 if (MIDORI_MOD_NEW_TAB (event->state))



More information about the Xfce4-commits mailing list