fyi Bookmarklet

UPDATE: April 19, 2011 Project now hosted elsewhere, see fyi-bookmarklets on Github

I wrote a simple bookmarklet to make it very easy to share a snippet of a web page and the URL by email (see Install and Usage below). I was inspired by Mike Chamber’s “fyi” Firefox ubiquity command which has served me well for years.

The “fyi” command (and now the bookmarklet) is a very handy way to select some text on a web page and fire off an email quoting part of the page and including the URL– with minimal typing and no copy-and-paste work. As Mike put it in 2008:

I wrote the command because I am often finding myself forwarding URLs to friends and co-workers. This is normally much more tedious than it needs to be, involving the following steps:

  1. Copy the URL from the browser
  2. Switch to mail client
  3. Create new Email
  4. Paste URL into the email body
  5. Switch back to the browser
  6. Copy the post title
  7. Switch back to email
  8. Paste the title as the subject
  9. Switch back to the browser
  10. Copy a snippet from the page
  11. Switch back to the email
  12. Paste in the snippet
  13. Enter the TO email address
  14. Finally send the email

Phew…

 

Well, no more. By using the [ubiquity] “fyi” command, you can quickly and easily forward information about a page to anyone.

Unfortunately, ubiquity is now an inactive project of Mozilla Labs.

 

Fortunately, Mozilla Firefox Custom Keywords allow you to easily make bookmarks or bookmarklets that can act like a command with a dynamic parameter. If a bookmark has a keyword, you can type that keyword in the Location Bar (address bar) and Firefox opens the bookmark. Even better, you can type string of text after the keyword and that string is passed to the bookmark. Just edit your bookmark putting a %s where you want the string to be substituted. Asa Dotzler and Daniel Wang explain it well on the Firefox Custom Keywords page. So well, in fact, that I was able to whip up a work-alike bookmarklet in a few minutes (and then spend last night tuning it and drafting this post).

Install:

First, bookmark this fyi link in Firefox. To bookmark a link you can right-click on it and “Bookmark this Link” or drag the link to your bookmark bar.

 

Second, add fyi as a keyword property of the new bookmark. To add a keyword, use the “Bookmarks” menu to select the “Show All Bookmarks” menu item. In the resulting “Library” window, navigate to the new bookmark and highlight it. If necessary, us the control beneath the property labels to expand the property panel to reveal the field for “Keyword”. Finally, enter the keyword fyi.

Firefox Library, property panel with keyword attribute set to fyi

Close the “Library” to save your changes.

Usage:

fyi [to_email]

 

Activate the “fyi” bookmarklet by using the bookmark menu, or by clicking the bookmark in your bookmark bar, or (ideally) move the cursor into the Location Bar and type:

fyi

and hit enter. This opens the default email program and creates a new email with the page title in the email subject. The email body contains the page title and URL. If any text on the page is selected, then the selected text is also included in the body.

If typed, the command optionally takes 1 argument, that includes one or more email addresses, separated by semicolons. The email address(es) will be put in the TO field of the new email.

Requirements:

Version History:

Version 1.0 (April 6, 2011) more recent versions on Github

Known Issues:

Tested with Firefox 4.0 on Mac OS X 10.6 and Win XP. May or may not work with Chrome, IE or Safari. A version optimized for iOS Mobile Safari is also available.

License:

MIT

Source:

Source on Github

Use comments to report bugs or provide feedback. Thanks.