02 November 2005

Google Site Search Bookmarklet

finally got tired of having Firefox's google toolbar just sitting there doing nothing... so i dumped it, and scratched up this bookmarklet for the only thing i really do use the toolbar for anyways - quick searching a site with google

javascript:void(site1=document.location.host); void(srchstr=prompt('enter Search String :','',' Google Site Search'));{if(srchstr!=null) {location='http://www.google.com/search?q=site%3A' +site1+ ' + '+srchstr}};


to use this bookmarklet on firefox :
- just right click the bookmark toolbar and select 'New Bookmark...'.
- then, in the dialog that appears, enter something like 'Google Site Search' for the Name and copy the short piece of script above into the Location field.

Now from any site, clicking the Google Site Search button wll prompt you for a Search String and find it on that site using google.

No comments :