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.4k stars 254 forks source link

Not disabling on iframes of sites that match disabled rules #709

Open yang opened 2 years ago

yang commented 2 years ago

I added a site to the disabled rules, but the extension is still running on iframes. Is there a way to prevent this from happening? Thanks for the great extension.

gdh1995 commented 2 years ago

It's designed to do so. Therefore, you need to add exclusion rules for those 3rd-party iframes, too.

You may click an iframe's content, and click Vimium C icon, and then Vimium C's popup dialog will auto predict an exclusion rule whose pattern is the iframe URL.

yang commented 2 years ago

If you are open to adding an option for this, I can look into contributing it

yang commented 2 years ago

(Fyi, my use case is a web application that has many different origins as iframe content. It is tedious to add every individual sites to the exception list.)

gdh1995 commented 2 years ago

Then I wonder why all frames of those origins are not suitable to run Vimium C commands. In theory, pages from different (top-level) origins can not visit each other's JS world, so they should not have any consistent shortcut module?

If those origins belong to a same top-level origin, then exclusion patterns support RegExp and should be able to match them.

yang commented 2 years ago

Yeah, they don't belong to the same TLD. They communicates cooperatively using for instance postMessage. They interact poorly with Vimium because the outer application is a complex web page editor, and Vimium interferes with various keyboard operations.