josh-berry / tab-stash

Firefox extension to save and restore tabs as bookmarks. Clear your tabs, clear your mind.
https://josh-berry.github.io/tab-stash/
Mozilla Public License 2.0
761 stars 45 forks source link

Allow different handling of left and middle-click on the addon button #339

Open ModProg opened 1 year ago

ModProg commented 1 year ago

Problem Statement

I'd like to have an easy way to both stash all tabs or show the stashed tabs using the mouse. Currently, it is necessary to open the context menu if you want to do something that was not assigned as the primary action of the button.

Preferred Solution(s)

Allow to bind middle-click and left-click individually in the settings, i.e. allow making one stash all tabs and the other show stash.

Additional Context

Not sure if this is possible, i.e. if Firefox allows accessing the mouse-button that clicked the add-on toolbar icon.


Readers: If you are also interested in seeing this feature be developed, please vote for it by giving the ORIGINAL POST a thumbs-up using the :smiley: button. You are welcome to leave comments and discuss the feature request, but "Me too!" comments are not counted by the voting system.

josh-berry commented 1 year ago

Seems like it should be possible; Firefox's API claims it works:

https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/browserAction/onClicked

There is also support for modifier keys (e.g. Ctrl+Click).

Thanks for the feature request, I'll keep it in mind!