You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you use the blog plugin for DokuWiki, you get links saying "<< Newer entries" and "Older entries >>". This would be fine, except that the default DokuWiki theme also includes links labelled "Backlinks" and "Back to top". Since "Backlinks" is more than one word shorter than "Older entries >>", and due to a separate bug described below "Back to top" is treated the same, trying to go to the previous page incorrectly discards the real candidate links, so you get sent to the top of the page rather than the older blog posts.
The aforementioned bug is in the wordCount calculation – if a link is chosen as a candidate because its title or aria-label looks good, but its innerText is empty, then it will get a wordCount of 1, and thus be unfairly chosen over other candidates. (Here, the "Back to top" link would not be chosen if the wordCount was calculated correctly; instead "Backlinks" would be selected.)
I can see a few possibilities that might help to address the imperfect heuristic:
reduce the degree by which link length matters (e.g. permit differences of two words in length, not just one)
apply word-boundary matching (exactWordRegex) before picking the maximum word length
additionally score candidates by the number of times they match against linkStrings
As a workaround, I have removed "back" from "Previous patterns" in my Vimium preferences.
Describe the bug
If you use the blog plugin for DokuWiki, you get links saying "<< Newer entries" and "Older entries >>". This would be fine, except that the default DokuWiki theme also includes links labelled "Backlinks" and "Back to top". Since "Backlinks" is more than one word shorter than "Older entries >>", and due to a separate bug described below "Back to top" is treated the same, trying to go to the previous page incorrectly discards the real candidate links, so you get sent to the top of the page rather than the older blog posts.
The aforementioned bug is in the
wordCount
calculation – if a link is chosen as a candidate because its title or aria-label looks good, but its innerText is empty, then it will get awordCount
of 1, and thus be unfairly chosen over other candidates. (Here, the "Back to top" link would not be chosen if thewordCount
was calculated correctly; instead "Backlinks" would be selected.)I can see a few possibilities that might help to address the imperfect heuristic:
exactWordRegex
) before picking the maximum word lengthlinkStrings
As a workaround, I have removed "back" from "Previous patterns" in my Vimium preferences.
To Reproduce
Steps to reproduce the behavior:
Browser and Vimium version
The text was updated successfully, but these errors were encountered: