thank you very much gentlemen...appreciate your support very much:)

On Tue, Apr 10, 2012 at 12:53 PM, Jan Honza Odvarko <[email protected]>wrote:

> See an example:
> (based on
> https://github.com/janodvarko/httpmonitor/blob/master/content/net/jsonViewer.js#L60
> )
>
> var myModule = Obj.extend(Firebug.Module,
> {
>    initialize: function()
>    {
>        Firebug.Module.initialize.apply(this, arguments);
>
>        Firebug.registerUIListener(this);
>    },
>
>    shutdown: function()
>    {
>        Firebug.Module.shutdown.apply(this, arguments);
>
>        Firebug.unregisterUIListener(this);
>    },
>
>    onContextMenu: function(items, object, target, context, panel,
> popup)
>    {
>        // Check panel name, your menu item doesn't have to be
> available
>        // in every panel
>        if (panel.name != "net" && panel.name != "console")
>            return;
>
>        // You can use clicked element
>        var memberLabel = Dom.getAncestorByClass(target,
> "memberLabel");
>
>        if (!memberLabel)
>            return;
>
>        var row = Dom.getAncestorByClass(target, "memberRow");
>        if (!row || !row.domObject.value)
>            return;
>
>        // Append a new menu item
>        items.push({
>           id: "fbNetCopyJSON",
>           nol10n: true,
>           label: Locale.$STRF("net.jsonviewer.Copy_JSON",
> [row.domObject.name]),
>           command: Obj.bindFixed(this.copyJsonResponse, this, row)
>        });
>    },
> });
>
>
> * Register a new UI listener - Firebug.registerUIListener
> * Make sure the listener is also unregistered
> * Implement 'onContextMenu' methods that will be called by the
> framework automatically when the user right click in a Firebug panel
> * Passed parameters:
>   - items: array with existing menu items
>   - clicked object
>   - target element
>   - current Firebug context
>   - the current panel object
>   - the popup menu itself
>
> Honza
>
> --
> You received this message because you are subscribed to the Google
> Groups "Firebug" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> https://groups.google.com/forum/#!forum/firebug
>

-- 
You received this message because you are subscribed to the Google
Groups "Firebug" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
https://groups.google.com/forum/#!forum/firebug

Reply via email to