rNeomy / auto-tab-discard

Use native tab discarding method to automatically reduce memory usage of inactive tabs
https://webextension.org/listing/tab-discard.html
Mozilla Public License 2.0
909 stars 79 forks source link

[Feature request] Ability to open popup when left click is set to other action #202

Closed HifeFish closed 3 years ago

HifeFish commented 3 years ago

When left-click action is set to anything else than "open popup", I have not found a way to open the popup. Hence I cannot access some functions (the context menu has some, but not all functions).

This could possibly be solved by:

a) having a choice of middle-click action with the same options,

b) an entry in the context menu that opens the popup.

rNeomy commented 3 years ago

Unfortunately, it is not possible. There is no API to assign the middle-click to an action. Also, the popup can only be opened with the left-click. This is a design decision made by Google.

HifeFish commented 3 years ago

@rNeomy For Firefox it should be possible since this bug has been resolved: https://bugzilla.mozilla.org/show_bug.cgi?id=1405031 I understand if it cannot work on Chrome and maintaining multiple versions is not feasible.

rNeomy commented 3 years ago

There is no API to open the popup window from the background page as far as I know. You can either set the popup window or use the background page to get events. With this API, it is possible to handle the middle click and allow the left-click to open the default popup.

HifeFish commented 3 years ago

So it would be possible to show the popup on left click and e.g. discard all other tabs on middle click or Ctrl+click? That would already make it much more convenient for me. (My motivation is, that when I am running low on memory, showing the popup before discarding tabs takes time and memory, so I would like to have a one-click solution for that, without losing the other functions.)