Vladimir Evdokimov

My portfolio and blog, mostly about Ruby on Rails

Custom actions for Chrome’s omnibox

A discussion about omnibox in google chrome led me to an idea on how to set up custom actions (not just search) to be performed using omnibox. So I could type new_event in address bar, press TAB and get to “new event” page at google.com/calendar with some predefined data.

All you need is to add new search engine in settings.

Search engine

  1. Go to chrome settings
  2. “Manage search engines”
  3. There are empty fields to add custom engine at the bottom of the list
  4. Fill those fields as follows:
    • New Email
    • new_email
    • https://mail.google.com/mail/?view=cm&fs=1&su=%s

New Email

Now you can type new_email, press TAB, type Hello world, press return key and you will see something like this:

As you see subject field is predefined with the string you typed in omnibox. You can predefine other parameters using this url:

https://mail.google.com/mail/?view=cm&fs=1&to=someone@example.com&su=%s&body=Hello&bcc=me@example.com

BTW ‘new_email’ thing can be done in any browser using old, good mailto: feature. But it’s just an example.

Calendar

Using same approach I set up an action to create google calendar events. Here is the URI:

https://www.google.com/calendar/render?action=TEMPLATE&text=%s&add=someone@example.com&location=Downtown

I guess same thing can be done in Opera and Alfred App.