For reference, this question first came up on 
stackoverflow<http://stackoverflow.com/questions/19901473/firebug-copy-css-path-to-command-line/19904243>
.

So Suhas, what you need is something like this:

var panel = Firebug.chrome.getSelectedPanel();

var hasConsole = !!context.getPanel("console", true);
if (!hasConsole)
    Firebug.chrome.selectPanel("console");
else if (panel && panel.name != "console" && !CommandLine.Popup.isVisible())
    CommandLine.Popup.toggle(context);

var commandLine = CommandLine.getCommandLine(context);
commandLine.value += Css.getElementCSSPath(elt);

And you need to include the Firebug, the CommandLine and the Css module for 
this.

My question is still, for what do you want to have this?

Sebastian

On Wednesday, November 13, 2013 7:00:51 AM UTC+1, Suhas Dwarkanath wrote:
>
> I am trying to modify the firebug plugin for Firefox. What i am trying to 
> achieve is when the user Inspects an element -> clicks 'Copy CSS path', the 
> CSS path should be pasted on the command line of the firebug.
>
> I am able to alert the CSS path from within the firebug. Is there any 
> possible ways to paste the same on the command line? Screenshot has been 
> attached for reference. Thank you for your time. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Firebug" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/firebug.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/firebug/4c75e284-6245-43d5-ab87-9ba1210a5ffd%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to