Suhas Dwarkanath
Suhas Dwarkanath

Reputation: 39

Firebug - Copy CSS path to command line

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?

Guide screenshot

Upvotes: 0

Views: 304

Answers (1)

Sebastian Zartner
Sebastian Zartner

Reputation: 20125

There's a function called getCommandLine() located inside the CommandLine module. With that function you can get the Command Line. To change the value inside it you can then use its value property.

Example code for this can be found in the UseInCommandLine module.

Btw. instead of using alert(), which blocks the UI, you can use the extension FBTrace and log messages to its console via FBTrace.sysout().

Sebastian

Upvotes: 1

Related Questions