Open vitaly-zdanevich opened 8 months ago
Sounds good, but:
I think this is somewhat out of scope of this extension (After all, this extension is for "one click to switch between engines with the same keyword"). What more important is, there are already multiple WebExtensions are specially designed to do this task, for example, the Trufflepiggy you mentioned? It even provides more and more engines already. (Though, the only reason I can think of is 1. for those who don't want to install too many WebExtensions if possible, 2. FLOSS?)
Don't sure if contextMenu
can be hidden via option_ui
(I didn't tried before) for those who don't need this feature and don't want the contextMenu
too many unused items...?
I had ever used only browser.menus.create()
before, don't sure if browser.menus.removeAll()
can do this. Need some experiment. https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/menus
A last but not the least note, FireFox Android doesn't support browser.menus
APIs, need to handle this specially and test on Android. (If my memory serves me right, something like if (browser.menus !== undefined) { /* setup menus... */ }
)
Like this
Maybe I will try to implement this, if ok.