December 28, 2006
Script for Google Reader Search
I wrote earlier how you can add search to Google Reader. In case you wanted a Greasemonkey script that actually adds a search box in Google Reader, here it is:
Google Reader Custom Search
First you need to have Greasemonkey for Firefox. After installing the script (a simple click on the link), you need to go to Tools / Greasemonkey / Manage scripts, find Google Reader Custom Search in the list and click Edit.
You'll see some instructions in the text file. Basically, you need to search for "test" using your custom search engine, copy the URL, remove "&q=test" from the address and put the result in SearchURL variable. You'll get something like:
var SearchURL="http://www.google.com/custom?cx=...";
Update: This also works in Opera 9. Press F12, select "Edit site preferences", click on "Scripting" and copy the path from "User Javascript files". Save
the script there and edit the file using Notepad like described above.
Update 2: John Marshall wrote a better script that shows the search results inside Google Reader.
Update 3 (Sept. 2007): Google Reader added search.
Subscribe to:
Post Comments (Atom)
Great. Thanks a lot.
ReplyDeleteI tried this on Linux/firefox and made a mistake:
ReplyDeleteI specified vi as the editor, when a gui editor is
required. Now I cannot get back to the menu that
let's me select the editor, so I'm stymied...
Help!
I made my own version of this script(based off of my original one), you can get it here: http://userscripts.org/scripts/show/6912
ReplyDeleteIt has two buttons, one to search the feed in blogsearch, the other to search with the custom search engine.
Both searches show directly in Google Reader and don't open a separate window.
Anonymous: That is set in the "greasemonkey.editor" preference, you can change it via about:config. You can also edit the files normally. They are in the gm_scripts folder of your Firefox profile.
your script doesn't work perfectly, sometimes the scroll function will not allow you to see all your entries
ReplyDeleteYou mean the second script, right? This one was written by John Marshall (you can contact him at JohnM555@gmail.com). I agree it has some bugs. For example, if I do a search in the list view and then I switch to the expanded view, Google Reader will just show me the "loading" icon. Write to the author and explain the issue.
ReplyDeleteThe first script is much simpler, so it can't have too many bugs.
Good job, Alex. I found your blog through lifehacker. This is really nice.
ReplyDelete-ewH
Is there any way to do a search on only starred or shared items?
ReplyDeleteBTW, this is very helpful and I am so surprised that Google hasn't integrated it into the reader.
ehm. what is the exact text i have to paste in the user script editor?
ReplyDeleteOne alternative is to use Google Co-op and import your GR OPML file and build your own custom search engine. I've posted the details here.
ReplyDeleteSteve, that's exactly how this thing works.
ReplyDeleteOkay, am I just insanely stupid? I followed all the instructions (I think) and don't see anything on my Reader home page. No search box, nothin'. Greasmonkey is installed and enabled, etc. etc.
ReplyDeleteWeird. I tested both scripts linked from the post and both work pretty well. You're supposed to see a search box and one or two buttons. Then you'll have to edit the script with the URL of your custom search engine.
ReplyDelete