Hi,
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 recieves 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.
I'm really new to javascript, but regardless of that, any information would be appreciated.
This is what my myaddon.xul file looks like:
<overlay id="sample" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script type="application/x-javascript" src="chrome://myaddon/content/myaddon.js" />
<textarea id="urlbar" ontextentered="return myaddon_URLBar(param);" />
Thanks in advanced!