views:

150

answers:

2

I'm writing a piece of code for a Chrome+Firefox extension that redirects users to a search results page for a given string. Currently we redirect to the google search results, and instead of building our own option for search engines, I was wondering if there is a way to use whatever search engine the browser is set to use.

I was wondering if there is a way for a Javascript to detect what search engine the browser is set to? Or to pass on a URI to the browser (Or call a browser API), that the browser then translates to the proper URL for the search results?

+1  A: 

For Firefox, you should take a look at nsIBrowserSearchService.

sdwilsh
A: 

This capability isn't exposed in the Chrome extensions API. You can file new feature requests like this at crbug.com/new.

Erik Kay