[Xfce4-commits] <midori:master> Don't display link numbers at all instead of hiding

Christian Dywan noreply at xfce.org
Tue Oct 26 23:04:02 CEST 2010


Updating branch refs/heads/master
         to 8b7640731da3317ba74bcea671bdc8e15c9741fb (commit)
       from 844bb5aa056a1ca9ff1057c11856a9a54d9a5201 (commit)

commit 8b7640731da3317ba74bcea671bdc8e15c9741fb
Author: Christian Dywan <christian at twotoasts.de>
Date:   Tue Oct 26 21:55:11 2010 +0200

    Don't display link numbers at all instead of hiding

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

diff --git a/midori/midori-view.c b/midori/midori-view.c
index abb25a4..415ef3c 100644
--- a/midori/midori-view.c
+++ b/midori/midori-view.c
@@ -1839,8 +1839,10 @@ gtk_widget_key_press_event_cb (WebKitWebView* web_view,
             script = g_strdup_printf (
                 "var links = document.getElementsByClassName ('midoriHKD87346');"
                 "var i = %d; var return_key = %d;"
-                "if (return_key || typeof links[i * 10] == 'undefined')"
-                "    location.href = links[i].parentNode.href;",
+                "if (return_key || typeof links[i * 10] == 'undefined') {"
+                "    for (var j = 0; j < links.length; j++)"
+                "        links[j].style.display = 'none !important';"
+                "    location.href = links[i].parentNode.href; }",
                 view->find_links, event->keyval == GDK_Return);
             result = sokoke_js_script_eval (js_context, script, NULL);
             g_free (script);
@@ -1849,8 +1851,8 @@ gtk_widget_key_press_event_cb (WebKitWebView* web_view,
         {
             result = sokoke_js_script_eval (js_context,
                 "var links = document.getElementsByClassName ('midoriHKD87346');"
-                "for (var i = 0; i < links.length; i++) {"
-                "  links[i].style.visibility = 'hidden'; }",
+                "for (var i = 0; i < links.length; i++)"
+                "  links[i].style.display = 'none !important';",
                 NULL);
             view->find_links = -1;
         }



More information about the Xfce4-commits mailing list