Home > firefox > Program Firefox from outside

Program Firefox from outside

Yesterday I found a very interesting Firefox add-on called MozRepl. After installing it, you should start and activate it. Then you can connect via telnet through this module to your Firefox instance and you can program it from inside.

For instance, you want to query the number of tabs:

$ telnet localhost 4242
Connected to localhost.
repl> gBrowser.tabContainer.childNodes.length
repl> repl.quit()
Connection closed by foreign host.

See this previous post some examples how to control Firefox from a Python script.

List of useful operations

Categories: firefox Tags: ,
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: