Can I change the default search engine with the Google Chrome extension?

I need to develop an extension that adds a new search engine and installs it by default.

I did not find anything at https://developer.chrome.com/extensions/

Is it possible?

+4
source share
2 answers

You cannot set the default search engine in the search engine defined with the extension :

Providing a mechanism with incremental additions by default is problematic because there is no clear way to back up when the extension is deleted - especially if the previous ones (or, worse, all other engines) were deleted first. This may allow us to enter a β€œno default engine” that Chrome is not ready to handle.

Chrome directly supports keywords, for example. add a search engine for Wikipedia and make the keyword β€œw” and β€œw foo” will search Wikipedia for foo. Perhaps you can use this own feature as a workaround?

You can add a new keyword search provider through the chrome.omnibox API (but you cannot do it by default).

+5
source

Now you can create a new search engine and even set it by default; however, the way to do this is only available on Windows according to Chrome Docs :

Overriding options is an extension method for overriding selected Chrome settings. The API is available only on Windows.

The bottom line is: if your list of web store extensions is associated with a verified domain used in the search , you can specify it in the manifest.

This means that you can only do this if you control the search engine page to the extent you confirm it for your account in Webmaster Tools .

Below is the minimum configuration:

 "chrome_settings_overrides": { "name": "Example search", "keyword": "example", "search_url": "https://example.com/s?={searchTerms}", "favicon_url": "https://example.com/favicon.ico", "encoding": "UTF-8", "default": true }, 
+1
source

Source: https://habr.com/ru/post/1493184/


All Articles