ghostery / user-agent-desktop

Ghostery Desktop Browser
Mozilla Public License 2.0
120 stars 17 forks source link

Add custom search engines #470

Open 2br-2b opened 3 years ago

2br-2b commented 3 years ago

When I want to add a custom search engine that doesn't support Opensearch, like Wolfram|Alpha or Wikipedia, I am unable to do so natively. I either need to install an extension for the search engine or to use a website like https://ready.to/search/en/ to add it.

It would be nice if this functionality was built into the browser rather than needing to find some other utility do do this.

2br-2b commented 3 years ago

Related to #234

2br-2b commented 3 years ago

We could take some of the code from https://github.com/evilpie/add-custom-search-engine that is used to generate custom search engines and implement it here.

As the extension says:

With WebExtension we have to fallback to using another API that is also available to webpages: window.external.AddSearchProvider (See also the MDN article Adding search engines from web pages). This API requires that you use a http: or https: URL, and we also can't locally host a webserver with the WebExtension APIs, therefore the search engine XML file has to be uploaded somewhere.

If we were to integrate this directly into the browser, we could remove the limitation for this page only.

We could build in the page that Add custom search engine uses to build a search engine and add a link to this page to about:preferences to allow users to more easily add their own search engines.

Thoughts @evilpie?

evilpie commented 3 years ago

The AddSearchProvider method doesn't work anymore. If you can directly integrate into the browser you can just use internal APIs and save you some pain.

chrmod commented 3 years ago
Screenshot 2021-02-04 at 21 01 06

Another alternative is to use "Add a Keyword for this Search..." functionality.

btw. Hi @evilpie - long time no see 👋🏻

chrmod commented 3 years ago

We're recently introduce quite few more search engines and as much as we would like to add more choices this created a some problems with UI pollution:

Screenshot 2021-02-18 at 12 24 07 Screenshot 2021-02-18 at 12 24 41

We will have to solve this problem before we can introduce new search engines. Lets keep the issue open for future reference.