2010/11/8 rjgoldsborough <[email protected]>

> Hi all. I came across
> http://code.google.com/chrome/extensions/trunk/contextMenus.html
> and was wondering if there are any plans to integrate this with
> firebug. It would be very handy to be able to right click and select
> "Firebug" just like in Firefox.


Sure, as Steven pointed please star the following issue to get notified
about our progress:
http://code.google.com/p/fbug/issues/detail?id=3579


> I would be willing to give it a shot,
> but I didn't find anywhere to download the current code. Thanks!
>

Great! You can find a link to download [1] at our site [2], but as Sebastian
suggested if you're going to work with Firebug Lite code it is recommended
to download the code directly from our repository:

http://fbug.googlecode.com/svn/lite/branches/firebug1.4/test/

The actual code for the extension is under "/build/chrome-extension".

I'm focused right now on complex core changes in Firebug Lite so I'll be
glad to see contributions from the community so I can stay focused on the
hard work. I'm open to give you instructions how to implement this, so if
you need help just ask.

Implement this feature is easy, but not so easy as one might think. Chrome
does not include a reference to the clicked element that activated the
content menu so you'll have to find that element first, and note that the
context menu is handled at a background page and the Firebug Lite is running
at the page.

1) Find the element to be inspected - listen to "oncontentmenu" events in
the page to track the clicked element (running on a content script).

2) Detect context menu click - use Chrome's API to detect context-menu click
(running on a background page) and send a message to the content script
indicating that a click happened.

3) Select the element in HTML Panel - running on a content script, listen to
background's page message indicating a context-menu click, and execute the
following code to select the element:

Firebug.chrome.selectPanel("HTML");
Firebug.HTML.select(elementToBeInspected);

If you need help understanding Firebug Lite code, just ask.

regards,

Pedro Simonetti.


[1] https://getfirebug.com/releases/lite/latest/firebug-lite.tar.tgz
[2] http://getfirebug.com/firebuglite#Stable





>
> --
> 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]<firebug%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/firebug?hl=en.
>
>

-- 
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 
http://groups.google.com/group/firebug?hl=en.

Reply via email to