philc / vimium

The hacker's browser.
https://chrome.google.com/webstore/detail/vimium/dbepggeogbaibhgnhhndojpepiihcmeb
MIT License
22.65k stars 2.45k forks source link

Creating a way to use the F command to hover and not click. #2829

Open ghost opened 6 years ago

ghost commented 6 years ago

Many website such as Amazon use menus that need to be hovered over instead of clicked to open up more items.

If we could add in some way of using the F command to "hover the mouse" instead of clicking.

cyberhck commented 6 years ago

I'm not sure if it'll work on every site though, some might be listening to onMouseEnter (amazon does for their menu-aim thing), some websites might be using :hover psuedo class, not sure if it's possible, but definitely a good feature to add.

Maybe instead of F we can go for something else? since it's a little lesser used feature than link, right? maybe on H for hover?

smblott-github commented 6 years ago

Perhaps we should add something like...

map X LinkHints.activateMode hover
map X LinkHints.activateMode copyLinkText
map X LinkHints.activateMode openInNewWindow

(and so on).

mrmr1993 commented 6 years ago

IMO better would be

map X LinkHints.activateMode action=hover
map X LinkHints.activateMode action=copyText
map X LinkHints.activateMode action=copyUrl
map X LinkHints.activateMode action=openWindow

this also opens us up to do things like

map X LinkHints.activateMode action=click shift=true ctrl=true

I'm not a big fan of the naked options, since it could really limit our flexibility later, and opens us up to nonsense like

map X LinkHints.activateMode hover copyLinkText

But yes, we should do something like this.

smblott-github commented 6 years ago

Agreed.

everyonesdesign commented 5 years ago

Thought about the same thing today, it'd be awesome. Any updates on this?

Trollwut commented 5 years ago

Also want to know if someone had an idea on how to solve this :)

Also wouldn't it suffice to just place the mouse cursor above the link?

alexanderfarr commented 3 years ago

Is there a feature to hover with Vimium already or is there a plan until when it will be supported?

gdh1995 commented 3 years ago

3097 should have fixed this. @alexanderfarr

Trollwut commented 3 years ago

Can someone explain how I can hover something? I fear I'm too stupid to understand it in the linked MR.

gdh1995 commented 3 years ago

This MR adds a new option (aka.; parameter) to the command of LinkHints.activateMode. So you just need to open the option page, map a key sequence to the command and append an option of "action=hover" to the end of the line.

---Original--- From: "Trollwut"<notifications@github.com> Date: Sun, Aug 30, 2020 00:24 AM To: "philc/vimium"<vimium@noreply.github.com>; Cc: "Comment"<comment@noreply.github.com>;"Dahan Gong"<gdh1995@qq.com>; Subject: Re: [philc/vimium] Creating a way to use the F command to hover and not click. (#2829)

Can someone explain how I can hover something? I fear I'm too stupid to understand it in the linked MR.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

duckyb commented 3 years ago

This worked for me:

The &nbsp; stuff is just confusing

PS. Tested on Amazon and it works, for Aliexpress it doesn't work.

YusufGandhi commented 3 years ago

Can confirm Alibaba-related websites still cannot use this hover capability. Is there anything that I am missing here?

gdh1995 commented 3 years ago

@YusufGandhi Could you provide snapshot or detailed place of the buttons?

BTW, hover only means to use a simulated event to let page JS run something, while it won't make browsers show link URLs at the bottom-left corner.

YusufGandhi commented 3 years ago

2020-10-16_16-12-51 (1) @gdh1995 this is the animated gif. I am using e as the hover mapping. However, when I tried to hover the "Sell on AliExpress" by pressing AA, it didn't reveal the menu.

gdh1995 commented 3 years ago

The page uses CSS to act on hover (.ng-sub:hover .ng-sub-list), and web extensions have no API to change CSS states, so there's nothing Vimium can do to show the menu.

YusufGandhi commented 3 years ago

@gdh1995 ah, I see. so, it works when it's JS and won't work for CSS hover, correct?

gdh1995 commented 3 years ago

Yes.

jaymzh commented 3 years ago

This is necessary to react on FB with anything other than 'like`. I tried the above hover trick, but it didn't work.

WoxWik commented 3 years ago

Any way to cancel the hover?

gdh1995 commented 3 years ago

@WoxWik Escape next to a hover action will execute an "unhover" action. For example, on Wikipedia a "hover" action on a link shows a card, and Escape will make the card disappear.

hxu commented 2 years ago

Does the feature in #3097 work with Filtered Hints mode? I was not able to get the mapped key to work, possibly because it was clashing with the filtering mode and it thought that I was typing more of the link I wanted to filter to.

gdh1995 commented 2 years ago

@hxu This doesn't affect Filtered Hints.

mmikeww commented 4 months ago

issue should be closed, see comment above, #3097 works, solution is added to wiki here: https://github.com/philc/vimium/wiki/Tips-and-Tricks#hovering-over-links-using-linkhints