Firefox addon to do something everytime a user hits Enter in the address bar
I'm trying to write an extension that monitors every time someone types hits enter when using the address bar. The steps would be something along the lines of
- User types in a bunch of text in the address bar and hits Enter
- My addon springs to life and receives what the user typed in
- My addon then decides what to do with the string the user typed in.
I get the url in step 2 by using var url = window.location.href. I also have most of step 3 written out already. The only probably I can't seem to figure out is how to monitor every tab to watch for when the user hits return.
This is what my myaddon.xul file looks like:
I think the following link would help. You need to implement Progress Listeners, they allow extensions to be notified whenever some events happen associated with the document. You can also extend this to multiple tabs. Please try the link
Hope it helps :)