Make browserAction's menu contain _solely_ its own custom items

Michael Buckley support at codefisher.org
Sun Oct 8 12:27:39 UTC 2017


Ok, I just complied Firefox and submitted a patch to 
https://bugzilla.mozilla.org/show_bug.cgi?id=1253419 with how I would 
want these menu style buttons to be implemented.

Regards
Michael

On 8/10/17 12:53 am, Michael Buckley wrote:
> I thought I would have a shot at this.  I am trying to copy 
> browserAction into an experiment and call it buttonAction to let me 
> have something to experiment with.  I think I have it kind of working, 
> but the problem is when it finds the manifest entry button_action it 
> does not call onManifestEntry. At least that is what I think it is, 
> since nothing is getting initialized. The docs are just so thin I 
> can't work out how to go from here.  None of the example experiments I 
> have seen use a manifest entry.
>
> Here is the code: https://github.com/codefisher/button_action
>
> It would be nice if I could get this working as it would be an easy 
> way to prototype solutions to some of the browerAction feature 
> requests bugs.
>
> If it is not possible, I will go the hard root of compiling Firefox.  
> It is about 4 years since I last did that, maybe it is time again...
>
> Regards
> Michael
>
>
> On 7/10/17 12:30 pm, Kris Maglione wrote:
>> There's a bug for that (https://bugzil.la/1253419) but it's not 
>> currently a high priority. I'd accept patches for it, though.
>>
>> On Sat, Oct 07, 2017 at 11:33:34AM +1100, Michael Buckley wrote:
>>> What I would like to see for this kind of situations is what we used 
>>> to have with button type "menu-button."  Right now we only have the 
>>> equivalents of "button" (if no popup is assigned) and "menu" (if a 
>>> popup is assigned).
>>>
>>> Type "menu-button" used to make a button that had a drop maker, so 
>>> pressing the button itself would run the action, and pressing the 
>>> drop maker would open the menu.
>>>
>>> Any thoughts on how this would work for you Marat Tanalin? Should I 
>>> make a bug asking for this?  Or is this kind of ui not really desired?
>>>
>>> Regards
>>> Michael
>>>
>>> P.S. sorry Marat Tanalin I don't use mailing lists often and I hit 
>>> the wrong reply button.  May bad, this one is going to the list.
>>>
>>>
>>> On 7/10/17 10:51 am, Marat Tanalin wrote:
>>>> Oh, thanks, Andrew.
>>>>
>>>> As a temporary workaround, I could imagine left-clicking a 
>>>> pageAction button to show the menu that I would otherwise display 
>>>> via right-clicking the browserAction button.
>>>>
>>>> And then the next question arises: how to associate a _regular_ 
>>>> (context-like) menu (not an HTML popup) with the pageAction 
>>>> button’s `command` event (_left_ click)?
>>>>
>>>>
>>>>
>>>> 07.10.2017, 02:36, "Andrew McKay" <amckay at mozilla.com>:
>>>>> You can't.
>>>>>
>>>>> You could file a bug to request that, but I'm pretty sure it won't go
>>>>> far. Users should be able to retain a standard interface to the
>>>>> toolbar buttons and be able to interact with them in a consistent 
>>>>> way.
>>>>>
>>>>> On 6 October 2017 at 16:16, Marat Tanalin <mtanalin at yandex.ru> wrote:
>>>>>>  Hello. How to make browserAction button’s context menu (opened 
>>>>>> via right click) contain _solely_ its own custom items and no any 
>>>>>> predefined items? Currently the menu also contains browser’s 
>>>>>> predefined items that have nothing to do with my extension.
>>>>>>
>>>>>>  Fwiw, I currently investigate ways to port my UsableHomeButton 
>>>>>> [1] extension to the WebExtensions API. The button’s context menu 
>>>>>> is a very important part (50%) of the extension’s functionality, 
>>>>>> and alien items are totally undesired there. I can’t use popup 
>>>>>> instead because pressing the button (via left click) is used for 
>>>>>> a different purpose (the first 50% of the extension’s 
>>>>>> functionality). Thanks.
>>>>>>
>>>>>>  [1] https://addons.mozilla.org/firefox/addon/usablehomebutton/
>>>>>>  _______________________________________________
>>>>>>  Dev-addons mailing list
>>>>>>  Dev-addons at mozilla.org
>>>>>>  https://mail.mozilla.org/listinfo/dev-addons
>>>> _______________________________________________
>>>> Dev-addons mailing list
>>>> Dev-addons at mozilla.org
>>>> https://mail.mozilla.org/listinfo/dev-addons
>>>
>>> _______________________________________________
>>> Dev-addons mailing list
>>> Dev-addons at mozilla.org
>>> https://mail.mozilla.org/listinfo/dev-addons
>>
>
> _______________________________________________
> Dev-addons mailing list
> Dev-addons at mozilla.org
> https://mail.mozilla.org/listinfo/dev-addons



More information about the Dev-addons mailing list