user-agent-desktop icon indicating copy to clipboard operation
user-agent-desktop copied to clipboard

Add custom search engines

Open 2br-2b opened this issue 4 years ago • 5 comments

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 avatar Feb 01 '21 01:02 2br-2b

Related to #234

2br-2b avatar Feb 04 '21 15:02 2br-2b

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?

2br-2b avatar Feb 04 '21 16:02 2br-2b

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.

evilpie avatar Feb 04 '21 17:02 evilpie

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 avatar Feb 04 '21 20:02 chrmod

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.

chrmod avatar Feb 18 '21 11:02 chrmod