nameless
nameless

Reputation: 1979

API to get the list of all search providers/engines?

I am developing an Opera extension. At some moment it allows the user to perform search. Now I use chrome.tabs.update with { url: `https://google.com/search?q=${encodeURIComponent(query)}`}. This is not user friendly. The better approach is to maintain a user-editable list of URLs like https://google.com/search?q= or https://ca.search.yahoo.com/search?p= in the extension's options page and allow the user to choose between them, but I really don't want to reinvent the wheel.

Chromium-based browsers all have user-configurable search engines/providers, and I want to allow the user to choose between them or just use the default. To make that possible, I basically need two API functions:

I didn't find anything similar to my problem in the API docs.

BTW, Opera also has an undocumented chrome.search function (Chromium has none), but it always searches via Google regardless of the user's default search engine setting.

Thanks.

PS. If there is a more appropriate place to ask this question, please tell me.

Upvotes: 4

Views: 843

Answers (1)

Xan
Xan

Reputation: 77541

I didn't find anything similar to my problem in the API docs.

Because there isn't one, unfortunately.

There is a relevant old feature request with no real activity.

Upvotes: 3

Related Questions