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?