posts by tag

greasemonkey (2)
Custom search for Google Reader

Sometimes I want to find something in Google Reader. Something I read awhile ago, but don’t remember where. I star posts I think might be useful, but sometimes I don’t know they’re useful until I need them. Google, being the number one search company, does not provide a search for Google Reader. I’m not sure why. Nevertheless, I came across a Greasemonkey script to do just that. It takes a decent amount of effort, though (it’s easy, it’s just not a “click to install and you’re done” type of script). And I’m sure (if you wanted this) you could figure it out, but I’ll explain it anyway.

Here are the steps to add the custom search to your reader:

  1. Download your OPML file from your reader to your Desktop (or wherever).
  2. Sign up for a custom search here: Google Co-op—for your search, just fill in whatever you want as the name, description, keywords, etc.
  3. Click “Next” then “Finish”. Then click on “control panel” then “advanced”. Look for the annotations section. Upload your OPML file you’ve just downloaded.
  4. Install this Greasemonkey script.
  5. Right-click on the monkey and choose “Manage User Scripts”.
  6. Select the “Google Reader Custom Search” and click “Edit” to open the JavaScript (Note: if you haven’t chosen a default editor for Greasemonkey scripts, it will prompt you to do so the first time).
  7. Near the top of the file, you’ll see a variable named SearchURL. This variable needs to have the address of your custom search. To get that URL, go back to your custom search homepage, and search for “anything”.
  8. Copy the response URL and paste it in the JavaScript file as the value of the SearchURL. You’ll be replacing the text “REPLACE-THIS” that’s there by default (Note: don’t remove the quotes).
  9. Lastly, remove the “&q=anything” from the URL you pasted in place of the “REPLACE-THIS” text. Save everything and “ok/close” all open windows.
  10. Refresh your Google Reader and you should have a custom search at the top.

The down side? You have to do this on every machine where you use Google Reader. The ideal case would be for Google to go ahead and implement a search for their reader, as I’m sure it would work a lot better than this solution. Until then, this might get you by.

Gmail greasemonkey script(s)

Maybe you’ve heard of GreaseMonkey scripts, but if not, it’s just a collection of user scripts (see userscripts.org) written in JavaScript that can be incorporated into the browser (Firefox and Flock). It’s been around for a while, but I’ve been neglecting it. It turns out that some of the scripts out there are very handy.

There are a ton for Gmail, but the one I find really useful is the multiple signatures script. I use Gmail to maintain all of my other email accounts as well, so you might want a different signature when sending email from another account (such as work). I know I do. Anyway, not often do you have to manually edit the script files, but in the event that you do, here’s how you do it:

  1. Right click on the little monkey in the bottom right of your browser (after you install GreaseMonkey that is).
  2. Select “Manage User Scripts”
  3. Choose the script you want to edit
  4. It will prompt you for an editor (first time only) to choose as your default to edit the scripts (I recommend PSPad)
  5. Edit the file, save it, close it, then click “OK” on the GreaseMonkey window
  6. Refresh your browser, and you’re good to go

Now, specifically for the multiple signatures script, you only have to edit three arrays: email_array, sig_array, col_array.

  • email_array is where you have to put all of the emails you’ll be sending to (whatever shows up in your Gmail drop down list when composing).
  • sig_array is the array that holds your signatures. Use \\n to split up multiple lines.
  • col_array is an array that holds HTML color codes, and will highlight your browser when you select that signature. I hate this option, so I set all of my colors to “transparent” so it wouldn’t do anything.

Just remember to keep the arrays in the same respective order. So if you have two emails (email1 and email2), make sure the desired signatures are in the same order (sig1 and sig2). Once it’s installed, look for the “Use Identity:” list under the “From:” drop down menu. Just click on the email you’re using, and the signature will be appended to your email.

2008 by Ryan Heath | Get In Touch

flickr

DesolateInfinityLooking upDazedBlurred