gdh1995 / vimium-c

A keyboard shortcut browser extension for keyboard-based navigation and tab operations with an advanced omnibar
https://chrome.google.com/webstore/detail/vimium-c/hfjbmagddngcpeloejdejnfgbamkjaeg
Other
3.28k stars 252 forks source link

Question: Search and open all matching urls #1166

Open agzam opened 1 month ago

agzam commented 1 month ago

Is there a way to perform a search e.g., /foo and then open all the matching urls on the page, each in its own tab, without having to cycle through the matches with n?

AFAIK this functionality was not possible before, but I've noticed some powerful new features been added, perhaps that is possible now?

gdh1995 commented 1 month ago

Not easy to do so by only using Vimium C commands. LinkHints.click may only click/open one link every time.

You may do so by writing JavaScript code:

map xxx openUrl url="javascript:<add-code-here>"
# or save a long URL as a bookmark
map xxx openBookmark title="the-exact-title-of-a-target-bookmark"

Then the code can call window.find looply and open all matched links.