if you want to write an extension for Chrome use the official
Chrome extension API for best results. And take a look at the
Omnibox API. Because there is a lot of illegal use the browsers often change some security solution and so some hacks wont work forever.