Change chrome default search engine using javascript

1,514 views
Skip to first unread message

aswathi

unread,
Oct 7, 2010, 6:07:21 AM10/7/10
to Chromium-dev
Hi,

I need to add my search website to the default search engine using
javascript via my extension. How to do this option?


Thanks.



Regards,
Aswathi.

Jochen Eisinger

unread,
Oct 7, 2010, 6:15:20 AM10/7/10
to aswat...@gmail.com, Chromium-dev
You can just add a search engine, and ask the user to make it the
default, see e.g. the Google SSL Search extension in the extension
gallery

> --
> Chromium Developers mailing list: chromi...@chromium.org
> View archives, change email options, or unsubscribe:
>    http://groups.google.com/a/chromium.org/group/chromium-dev
>

aswathi

unread,
Oct 7, 2010, 7:01:57 AM10/7/10
to Chromium-dev
Hi Jochen Eisinger,

Thank you for your response.

By coding how can i add my search engine to default search options
with out asking user? and how i can make as default without asking
user to any.


David Levin

unread,
Oct 7, 2010, 8:22:42 AM10/7/10
to aswat...@gmail.com, Chromium-dev
That can't be done as far as I know. 

At this very moment, I'm working on a javascript api to do this but it will require a user action and present the user with a dialog to confirm (http://code.google.com/p/chromium/issues/detail?id=38475).

Back to working on that api.

dave



--

Paweł Hajdan, Jr.

unread,
Oct 7, 2010, 10:22:23 AM10/7/10
to aswat...@gmail.com, Chromium-dev
On Thu, Oct 7, 2010 at 13:01, aswathi <aswat...@gmail.com> wrote:
By coding how can i add my search engine to default search options
with out asking user? and how i can make as default without asking
user to any.

Generally you can expect that such changes to configuration (default search engine) will require user's confirmation in some form, even if it would be "allow this extension to manage my search engine settings".

Vachagan

unread,
Jun 14, 2013, 8:41:28 AM6/14/13
to chromi...@chromium.org, aswat...@gmail.com, joc...@chromium.org
Hi, please help with this one...
I need to add search engine only (the same that user does manually) via my extension. 

Of course i understand that making it default without user confirmation is hardly possible... but i only need to add search engine (not handle it via extension)... 
I've tried to find Google SSL Search extension sources but didn't find anything except the extension actually (which is now obsolete)...

Could you help me with that... ?
I just need a small example... Even with user confirmation it will be fine...


Anton Vayvod

unread,
Jun 14, 2013, 9:42:08 AM6/14/13
to vachagan...@gmail.com, chromium-dev, aswat...@gmail.com, joc...@chromium.org
It seems that the API has been removed since https://codereview.chromium.org/8486025
The replacement is https://developer.chrome.com/extensions/omnibox.html (see Chrome Search example at the bottom), shows up as "Search engines added by extensions" in the search engines dialog.

Chrome also supports the External interface that allows to add search providers from the web page with a link to an OpenSearch description document




--

Jochen Eisinger

unread,
Jun 17, 2013, 4:16:50 AM6/17/13
to Anton Vayvod, vachagan...@gmail.com, chromium-dev, aswat...@gmail.com
Yes, the SSL Search extension just contained an OpenSearch description for encrypted search & suggest, and a simple HTML file with a button that used window.external.addSearchProvider to add the search provider on click.

-jochen
Reply all
Reply to author
Forward
0 new messages