]> spindle.queued.net Git - midori/commitdiff
Don't display link numbers at all instead of hiding
authorChristian Dywan <christian@twotoasts.de>
Tue, 26 Oct 2010 19:55:11 +0000 (21:55 +0200)
committerChristian Dywan <christian@twotoasts.de>
Tue, 26 Oct 2010 21:04:21 +0000 (23:04 +0200)
midori/midori-view.c

index abb25a4eb4643ab181e5122278fdd761430096ee..415ef3c6a17b195009bcd87164bdf3f39fa4ff2e 100644 (file)
@@ -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;
         }