Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get text from Address Bar in Firefox extension

I am building a Firefox Extension. I am using XUL and Javascript to do this. I need to get the text from my Firefox browser's address bar. Please don't get confused with URL where the browser has navigated, its just the text that user enters before the page redirects. Suppose user is at http://www.myexample.com or whatever page. Now he types Cricket in the Address Bar and as soon as he hits enter, I want to capture the text ("Cricket") from the address bar. I need this data to do some processing further in my code.

like image 781
sumit_programmer Avatar asked Sep 21 '10 11:09

sumit_programmer


1 Answers

It doesn't seem to be possible in Google Chrome, as answers to this question say.

But with Firefox, you may have a look at several extensions mentioned here or at this one and try to figure out how they did what they did. I searched MDC a bit, but without luck.

I don't have any experience with Firefox extensions, so I hope this will be helpful to someone who can give a more precise explanation.

like image 67
Marcel Korpel Avatar answered Sep 22 '22 09:09

Marcel Korpel