Google Homepage Reloaded

By mlevit Last update May 11, 2010 — Installed 10,576 times.

Script Summary: Modifies the Google homepage to imitate go.infinise.com giving the user the ability to click the Google logo or press the UP key and change the website they search (i.e. Bing, Wikipedia, Twitter and YouTube)



Version: 1.18

Copyright: 2009+, Marat Levit (www.mlevit.wordpress.com)

License: Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported; http://creativecommons.org/licenses/by-nc-sa/3.0/

Thumb Thumb Thumb Thumb Thumb Thumb

For any comments, problems, suggestions, discussions or defects please use our

UserVoice Forum


Description
Modifies Google's homepage to create a multi search site page. Clicking on the Google logo or pressing the Up arrow key on your keyboard will change the search site to Wikipedia. Clicking or pressing Up again will change to the next search site and so on until it once again comes back to Google.

This allows users to simply search other sites without leaving the Google homepage.
Default search sites
If you'd like more sites added, let me know.
Adding a site
If you wish to add a new site yourself, please follow these instructions:
  1. Open the script for editing from the Greasemonkey status bar icon.
  2. Find //Add custom sites below this line and //Add custom sites above this line.
  3. Between these lines add the following lines of code:
    searchSites[searchSites.length] = new SearchSite();
    searchSites[searchSites.length - 1].logo = "";
    searchSites[searchSites.length - 1].searchURL = "";
    searchSites[searchSites.length - 1].buttonText = "";
  4. Creating the logo
    1. Find a nice high resolution logo of the site you wish to add.
    2. In any program (i.e. Paint.NET, Photoshop) crop the logo and leave around a 1mm gap around it.
    3. Resize the logo. If it's a long logo, resize its width to be 276px if it's a tall logo resize its height to be 110px. Make sure the logos measurements don't exceed 276 x 110.
    4. Once you have resized the logo, place the logo inside a 276 x 110 pixel white rectangle.
    5. Save the logo as a GIF. Smaller file size, not much quality loss for such a small image.
    6. Head over to The data: URI kitchen, click browse, find your logo and click generate.
    7. You will be taken to another page. Copy the entire page and past it within the quotation marks for the .logo line of code.
  5. Creating the search URL
    1. Head over to the site you wish to add.
    2. Search the site for lets say "orange".
    3. Copy the URL you are taken too and replace the word "orange" with + QUERY_TERM + SCRIPT_URL_REF;, so it looks a little like "http://www.bing.com/search?q=" + QUERY_TERM + SCRIPT_URL_REF;.
    4. Replace the quotation marks with your new search URL for the .searchURL line of code.
  6. And finally within the quotation marks for .buttonText enter what you want to appear in the button (i.e. Wikipedia Search).
You are done. If followed correctly you should see your site come up when scrolling through the sites.

If you have any problems with the tutorial above, don't understand something or simply want to share something about it please don't hesitate to start a discussion.
Activating / Deactivating a site
If you wish to not use any of the sites I have included in the script you may deactivate them by doing the following:
Go to either Tools > Greasemonkey > User Script Commands... or Right Click the Greasemonkey icon in the status bar > User Script Commands... and click on the search site you wish to turn off or on.
The webpage will reload the menu should update to reflect these changes. If you visit this menu again you should now see "Off" instead of "On" if the search site was active and "On" instead of "Off" if the search site was inactive.
#
Known Issue / Defect
Status
28
Logo does not change on google.ru. The homepage differes to other Google homepages by using a div to display their logo by styling the div using CSS background-image:url(/intl/en_com/images/logo_plain.png);. As of right now, everything but the logo will change when clicking the logo; the search however will work.
Resolved in v1.10 (02/11/2009)
26
When typing into the Google search box with any one of the other search sites selected, Google's suggestions will drop down below the search box. Highlighting them using your keyboard and pressing the enter key will search for that term on the site you have selected. However, clicking the suggestion will search for that term using Google.
Resolved in v1.16 (05/11/2009)
Version
Date uploaded
Changelog
1.18
12/05/2010
Fixed: Due to Google's new layout when removing the I'm Feeling Lucky button it would leave a small verticle line. This has now been removed too.
Fixed: Google removed the search options like "Search only pages in Australia" from their main homepage, due to this there was a small error that would be triggered when scrolling through all the search sites and going back to Google.
Please backup all your customer search sites before updating to this new version.
1.17
17/11/2009
Fixed: Some coding errors.
Updated: When the user searches the search button use to receive focus as a workaround for google.com. Instead of that and due to Google's new minimalistic homepage, instead of changing focus to another object other than the search box, the focus is just removed from the search box without being given to another object on the screen.
1.17b2
14/11/2009
Fixed: The below fix didn't work because I missed encasing one piece of code in a check statement.
1.17b1
13/11/2009
Fixed: For users who have Google's new minimalistic homepage you would have noticed that the homepage does away with the search and I'm feeling lucky buttons. Therefore when the script tries to execute a couple of commands to change the button text it crashes. This has hopefully been fixed. Because I don't have that homepage and can't seem to get it working with a few well known workarounds I ask you not to install this upgrade (until I give it the all clear after testing) unless you are using Google's new homepage.
1.16
06/11/2009
Fixed: Issue #26. Please refer to the issue number above for more information.
Added: Greasemonkey menu which contains options that allow the user to switch specific search sites on and off. The menu can be accessed from Tools > Greasemonkey > User Script Commands... or Right Click the Greasemonkey icon in the status bar > User Script Commands...
The reason for this change is to allow users to quickly turn search sites on and off without having to modify the script code and by storing the users choice as a variable inside Firefox, these choices will remain valid when upgrading to newer versions of the script.
1.15
04/11/2009
Fixed: Script now copies and stores the initial search button text and then reuses it when the user does a full rotation of search sites. The reason for this is due to international Google homepages having the search button text in their home language.
Added: Bing search. Bing has been added due to a request from a user. If you wish to rearrange the order in which the sites appear in, you may edit the code and move around the five lines that create the search site.
Added: Constants. I have implemented the use of constants throughout the code. This will allow for easier script modification in the future.
Added: A new script license: Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported
Added: More @include and @exclude pages to make sure the script works only on Google search homepages. Script no longer works on google.com/reader or any other pages. If you do find the script works on some Google pages it shouldn't please let me know in the discussion boards.
Updated: "Adding a site" tutorial above. Minor changes to spelling, grammar and layout.
Updated: "Deactivating a site" tutorial to match the changes made in "Adding a site" tutorial.
1.14
03/11/2009
Fixed: Google changed its code for its Special Doodles. A different type of check was implemented to look for links around the logo that are normally associated with Google's Special Doodles. This check should now be more accurate at capturing these surrounding links.
1.13
02/11/2009
Added: Two commented lines to the script to match the new tutorial for adding sites. No functional changes/additions.
1.12
02/11/2009
Fixed: Pressing the ENTER key did not search the selected website on google.com. The problem has not entirely been determined but a workaround has been created that sets the cursor focus onto the Search button before searching the selected site. The loss of focus on the search box seems to do the trick.
Added: Pressing the UP key on the keyboard while the cursor is inside the search box will change the search site. This can only be done while the search box is empty. This is to allow the user to navigate through Google suggestions list once the have started inputting their search query.
1.11
02/11/2009
Fixed: Issue with google.com preventing Wikipedia logo from showing up. This was due to the country specific radio buttons (search options) not being present on google.com. The script now has a check for these search options.
Added: Higher quality GIF logos. Exact dimensions as the Google logo 276 x 110 pixels with a smaller GIF image size.
1.10
02/11/2009
Fixed: Issue #28. Please refer to the issue number above for more information.
1.05
31/10/2009
Fixed: Now caters for special Google Doodles. When Google displays a special Doodle (i.e. for Mothers Day, Halloween etc) they enclose the normal logo in a link. This link disrupts the way Google Homepage Reloaded Works. This has now hopefully been fixed.
Updated: The code for adding new search sites has been updated to be more generic allowing users to easily add their own sites. A tutorial on how to do this will be up on this site soon.
Added: After clicking the logo and selecting your search site, Google Homepage Reloaded will automatically set keyboard focus back onto the searchbox.
Added: A way to deactivate certain search sites.
1.00
31/10/2009
Added: Initial release. Currently with 3 search engines (Wikipedia, Twitter and YouTube). May not work properly on all Google homepages (i.e. google.ru).