woodruffw / ff2mpv

A Firefox/Chrome add-on for playing URLs in mpv.
https://addons.mozilla.org/en-US/firefox/addon/ff2mpv/
Other
521 stars 52 forks source link

Hide dropdown with no profiles set #114

Closed Velocidensity closed 8 months ago

Velocidensity commented 8 months ago

Is your feature request related to a problem? Please describe. The new addition of profiles breaks my usual workflow of right clicking a link, and hitting "play in MPV", as the option is now hidden behind a dropdown, which takes a moment to open, and requires more movement. Additionally, the position of the ff2mpv entry in the context menu has changed.

Describe the solution you'd like Dropdown should not be present when no profiles are set, and should show just "play in MPV". Alternatively, add an option to always enable a button alongside the dropdown.

Describe alternatives you've considered N/A

Additional context N/A

woodruffw commented 8 months ago

Dropdown should not be present when no profiles are set, and should show just "play in MPV". Alternatively, add an option to always enable a button alongside the dropdown.

IIRC, the former idea isn't possible with context menus in WebExtensions (but I could be misremembering). OTOH, the latter idea should work; I'd be happy to accept a PR for it.

CC @DanSM-5 as well, in case you have any ideas. If nobody wants to do a PR here, I'll look into this when I have the free time.

woodruffw commented 8 months ago

(I also find the one additional click slightly less convenient. So this has medium-high priority on my personal list.)

DanSM-5 commented 8 months ago

I think the first idea is possible by just changing the contents of the context menu. This depends if a profile is present or not, so it should be just checking if there are elements stored.

I can have something done tonight.

woodruffw commented 8 months ago

Done with #115. I'm going to do some cleanup and cut a minor release for this in a bit.

woodruffw commented 8 months ago

This has been released with 5.1.0, which is now available on AMO and will be available via the Chrome Store shortly. Thanks to all who reported, and thanks @DanSM-5 for the fix!

juippis commented 8 months ago

Hey,

on 5.1.0 I don't have the "Play in MPV" option in my right click menu at all now. Using Firefox. Downgrading to 4.0.0 still works.

woodruffw commented 8 months ago

on 5.1.0 I don't have the "Play in MPV" option in my right click menu at all now. Using Firefox. Downgrading to 4.0.0 still works.

Hmm -- could you share your browser/OS/profile information? I confirmed that 5.1.0 reverts to the 4.x behavior locally, but there may be regressions.

juippis commented 8 months ago

I'll open a new issue for visibility, if I'm not the only one out there :)

woodruffw commented 8 months ago

I'll open a new issue for visibility, if I'm not the only one out there :)

Thank you!