Bookmarklet to search current site using Google
(This has been done before, but I’m putting my own spin on it.)
I often use Google to search a particular website, using “site:example.com” and my search terms. It gets a bit tedious entering “site:example.com”, so I made the following bookmarklet:
It prompts for the search terms, automatically adds the “site:” keyword and domain name, then goes to Google. You can select some text on the page before you click the bookmarklet, and your selected text will be used as the default search keywords.
For Firefox just drag-and-drop the link to your bookmarks toolbar. For IE, right-click the link then select “Add to Favorites…” (you might get a warning message since the bookmark contains javascript) then add it to your Links toolbar.
Inspired by: Search Bookmarklets
April 11th, 2006 at 10:20 am
interesting thing. btw why does the word “love” come while posting comments?
April 11th, 2006 at 10:26 am
I was getting a lot of automated comment spam, so I hacked WordPress to do a simple word check. It doesn’t stop anyone from manually entering comments, but it stopped the automated spammers. Since it’s a custom hack on just one blog, it’s unlikely that the automated spammers will modify their procedures to get around it.
April 13th, 2006 at 1:42 am
May be your reader’s can benefit from more bookmarklets at this location.
http://www.wisdombay.com/bm/bm00001.htm
May 4th, 2006 at 11:19 am
This without adding ’site:example.com’
javascript:(function() { var h, q; h = location.hostname; q = (window.getSelection ? window.getSelection() : document.getSelection ? document.getSelection() : document.selection.createRange().text); q = prompt('Search \'' + h + '\' using Google:', q); if(q != null) { if(h) { q = q; } location = 'http://www.google.com/search?q=' + encodeURIComponent(q) + '&sitesearch=' + h + '&domains=' + h;}})();April 13th, 2007 at 8:03 am
Fantastic and it works with Opera browser too! Just drag it directly into your Opera’s toolbar.