Skip to content

Instantly share code, notes, and snippets.

@nt1m nt1m/search-proposal.md
Last active Feb 26, 2017

Embed
What would you like to do?
Search engines proposal

Adding new search engines: the search_engine manifest field

{
  "search_engine": "opensearch.xml"
}

Managing search engines: the browser.searchEngines namespace

- browser.searchEngines.remove()
Removes a built-in search engine
- browser.searchEngines.list()
Returns an iterator/array of Engine objects
- browser.searchEngines.disable()
Disables a search engine
- browser.searchEngines.enable()

The Engine object

{
  name,
  opensearchURL,
  url,
  method: "GET/POST"
  ??
}

Other API possibility

Extend chrome.management to support querying engines

@Smile4ever

This comment has been minimized.

Copy link

commented Feb 26, 2017

An attribute for the icon is missing.

@Smile4ever

This comment has been minimized.

Copy link

commented Feb 26, 2017

Also, a way to set the default search engine needs to be thought of. This can be implemented by adding a property default to the object and then calling browser.searchEngines.update or by creating a function setDefault.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.