6 September 2005
Google Toolbar Custom Searches
I logged in to Gmail just now and saw a new feature on the Settings page.
New! Get the Google Toolbar, now with Gmail search, and search your mail quicker than ever.
The installer download on that page – named GmailToolbarInstaller.exe – simply added a Gmail button to my Google Toolbar that allows me to search Gmail (or takes me to my Gmail inbox if I don’t enter any search terms).
I figured that since the install was only 15 KB, it must have been a pretty simple upgrade. On the surface, the only changes were that a Gmail icon was now in the toolbar and in the "Search the Web" drop down next to the search box. Also, the "Search" tab of the Google Toolbar "Options" window had a new section called "Add Custom Search Buttons to your Toolbar" that listed the Gmail icon with a checkbox next to it. Hunting around in Registry Editor, I found this new key:
HKEY_CURRENT_USER\Software\Google\CustomSearch\Gmail
The term "CustomSearch" was intriguing, so I decided to try and add my own custom searches. What I found was that you can add you own custom search buttons to the Google Toolbar by making a few simple changes to your registry...
Caution: Editing your registry incorrectly can cause irreparable system damage. Fiddle with it at your own risk!
Here’s an example of an exported registry key that adds a Yahoo! Search button:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Google\CustomSearch\Yahoo]
"Site"="http://search.yahoo.com/"
"Tip"="Yahoo! Search"
"Title"="Yahoo! Search"
"Url"="http://search.yahoo.com/search?p={query}"
Icon
(not shown here) contains a hex encoded icon that will be used for the button in the toolbarSite
contains the URL that you will be taken to if no search terms are enteredTip
contains the text that appears in the tooltip when you hover your mouse over the buttonTitle
contains the name of the button used in the "Search the Web" drop down and the "Add Custom Search Buttons to your Toolbar" listUrl
contains the URL, complete with the query string, for the search you wish to perform
Likewise, here’s one that will add an MSN Search button:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Google\CustomSearch\MSN]
"Url"="http://search.msn.com/results.aspx?q={query}"
"Site"="http://search.msn.com/"
"Tip"="MSN Search"
"Title"="MSN Search"
Basically, you can add a button for any site that uses a query string! For example, here’s one that will query Alexa for a website’s details when you enter a domain:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Google\CustomSearch\Alexa]
"Site"="http://www.alexa.com/"
"Tip"="Alexa"
"Title"="Alexa"
"Url"="http://www.alexa.com/data/details/?url={query}"
These buttons then appear in the drop down list of search buttons next to the search box:
... or you can add them to your toolbar from the "Search" tab of the Google Toolbar "Options" window:
Here are some sample registry files that automatically install the search buttons:
- Alexa Custom Search Button
- MSN Search Custom Search Button
- Yahoo Search Custom Search Button
- Ruscoe.net Custom Search Button – added 14 Sep 2005
- Google Blog Search Custom Search Button – added 14 Sep 2005 – more about what this is here
- Flickr Custom Search Button – added 16 Sep 2005
- Answers.com Custom Search Button (by Matt) – added 20 Sep 2005
- Google Suggest Custom Search Button (by Matt) – added 20 Sep 2005
- Wikipedia Custom Search Button (by Matt) – added 20 Sep 2005
- Play.com Custom Search Button – added 22 Sep 2005
- AlltheWeb.com Custom Search Button – added 6 Nov 2005
- Google Video Custom Search Button – added 17 Jan 2006
Simply right-click the links, download the files (selecting Save Target As...), change the extension to ".reg" and just double-click to install the custom search buttons. [Insert usual disclaimer about me not being held responsible for your actions here.]
At last – I only need to have one toolbar installed that will handle all my search needs!
Update: 16 September 2005
I’ve just discovered that these instructions work for both Internet Explorer and Firefox, although I don’t know where Firefox stores which custom search buttons it should display in the toolbar...
Update: 6 November 2005
Several people have asked me how to create hex encoded icons for use in these files, so here’s how it’s done:
- If it exists, download the “favicon.ico” file from the root of the website you’re creating – i.e. http://ruscoe.net/favicon.ico. (If the site doesn’t have its own icon, you can either create your own 16 x 16 ICO or GIF to use instead.)
- Open the icon file in a hex editor that allows you to “copy as hex string” – such as XVI32 by Christian Maas.
- Copy the hex code of the icon and paste it into the registry file with commas instead of spaces and slashes at the end of each line, as shown in the examples above.
Labels: google
3 Comments
But well done anyway Tony nice little mod (which we all love) for a popular appy, for all you yesteryear users !!!!!
I guess it's partly because I trust Google more that some dodgy programmer who could have easily written a keylogger or spyware into his handy toolbar.
Of course, I'm not saying that all programmers are malicious, but you know what they're like... ;-)
(Just don't ask why I'm still using IE rather than Firefox... I simply can not answer that one!)
Just one question: can you recommend a tool to create these hex encoded icons?