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.44k stars 255 forks source link

Work with *yet another speed dial* #1238

Closed stevenxxiu closed 1 month ago

stevenxxiu commented 1 month ago

Describe the bug

I modded yet another speed dial so that Vimium C displays there.

This lets me highlight links, but clicking on the links with f doesn't work. I only get a big box that highlights a link.

Not sure if this is relevant, but this does nothing:

document.querySelector('a.tile').click()

While this opens the URL:

window.open(document.querySelector('a.tile').href, '_self')

I'm not sure how to configure this in Vimium C though:

env cYASSm host="moz-extension://d7bb54f2-34b1-43d4-a010-79f7f8b2bf44/index.html"
map f runKey expect=[["cYASSm","<v-f>"]] keys="<v-f>"
map <v-f> ???"

Browser, OS and Vimium C versions

stevenxxiu commented 1 month ago

Actually I figured out a hacky method to get this to work:

env cYASSm host="moz-extension://d7bb54f2-34b1-43d4-a010-79f7f8b2bf44/index.html"
map f runKey expect=[["cYASSm","<v-f>"]] keys="<v-f>"
map <v-f> LinkHints.activateFocus $then="openUrl#url=javascript:window.open(document.activeElement.href,\u0020'_self')"

The only problem is that the URL bar gets focus when I press a new tab, but I suppose that's a separate issue.

stevenxxiu commented 1 month ago

I tried https://github.com/cadeyrn/newtaboverride, and unbelievably, it does let me focus content when I open this.