Count link labels separately from actual elements
Not all link elements will have visible labels.
This commit is contained in:
parent
6931025617
commit
850438daee
1 changed files with 7 additions and 5 deletions
|
@ -1885,12 +1885,14 @@ gtk_widget_key_press_event_cb (WebKitWebView* web_view,
|
||||||
" border:1px solid gray; padding:0 0.1em !important;"
|
" border:1px solid gray; padding:0 0.1em !important;"
|
||||||
" position:absolute; display:inline !important; }');"
|
" position:absolute; display:inline !important; }');"
|
||||||
"var links = document.getElementsByTagName ('a');"
|
"var links = document.getElementsByTagName ('a');"
|
||||||
|
"var label_count = 0;"
|
||||||
"for (i in links) {"
|
"for (i in links) {"
|
||||||
|
" if (links[i].insertBefore && links[i].href) { "
|
||||||
" var child = document.createElement ('span');"
|
" var child = document.createElement ('span');"
|
||||||
" child.setAttribute ('class', 'midoriHKD87346');"
|
" child.setAttribute ('class', 'midoriHKD87346');"
|
||||||
" child.appendChild (document.createTextNode (i));"
|
" child.appendChild (document.createTextNode (label_count));"
|
||||||
" if (links[i].insertBefore && links[i].href)"
|
" links[i].insertBefore (child);"
|
||||||
" links[i].insertBefore (child); }",
|
" label_count++; } }",
|
||||||
NULL);
|
NULL);
|
||||||
view->find_links = 0;
|
view->find_links = 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue