Firefox Ubiquity Command : fyi
I have just created a new Firefox Ubiquity plugin command named “fyi”. The command makes it super simple to email info about a web page to anyone.
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:
- Copy the URL from the browser
- Switch to mail client
- Create new Email
- Paste URL into the email body
- Switch back to the browser
- Copy the post title
- Switch back to email
- Paste the title as the subject
- Switch back to the browser
- Copy a snippet from the page
- Switch back to the email
- Paste in the snippet
- Enter the TO email address
- Finally send the email
Phew…
Well, no more. By using the “fyi” command, you can quickly and easily forward information about a page to anyone.
Install:
Press the “Subscribe” button that appears at the top of the page. (You must be running in Firefox, and have the Ubiquity plugin installed).
Usage:
fyi [to_email]
Open the Ubiquity command window and type:
fyi
and hit enter. This will open your default email program and create a new email with the current page title set as the email’s subject, and the current page url / location included in the email’s body.
The command optionally takes 1 argument, which includes one or more email addresses, separated by commas. The email address(es) will be placed in the TO field of the generated email.
If any text on the page is selected, then the selected text will also be included within the body of the generated email.
Requirements:
Note, the command has only been tested with Ubiquity 0.1.1 on Mac with Mac Mail. Please post results with other operating systems, and email programs in the comments.
Version History:
Version .87 (September 1, 2008)
- Made fixed for » issue in title to only take effect on Mac. (Issue doesnt affect windows).
Version .86 (September 1, 2008)
- fixed issue where selected text could be specified as email address if no email address argument was passed in
- Fixed issue where pages with » in title would break command
- Removed some debug code that was generating Growl messages on Mac
Version .85 (August 31, 2008)
- Initial Release
Known Issues:
- Email address will only appear in live preview once the “@” symbol is entered.
- Pages with titles that contain characters that must be URL encoded MAY break the command. If you come across a page that breaks the command, please post it in the comments.
License:
Source:
Post any bugs, questions, comments or suggestions in the comments.






Nice work Mike! I had never heard of Ubiquity and am so glad you turned me on to it.
I tried your command while running WinXP 64-bit and using Thunderbird as my email program. I only ran into two issues:
1) it doesn’t like the title of this web page, my subject line ends up being “Mike Chambers ” followed by dozens of ? characters.
2) if I don’t use the Ubiquity command window and just right-click and choose Ubiquity -> fyi, it throws the selected text not only into the email body but into several To: fields
Can’t wait for future versions of Ubiquity! Keep up the great work!
- William Haun
William Haun
31 Aug 08 at 9:47 pm
Hey nice command but it’s not working for me. After entering the FYI command it does switch over to Mail (OSX) but it doesn’t generate a new email. =(
Winrich
31 Aug 08 at 9:50 pm
Oh whoops! It works I just had to restart Firefox. Great Job!
Winrich
31 Aug 08 at 9:52 pm
Actually.
It doesn’t generate an email for me when I’m at the Ubiquity page (http://labs.mozilla.com/2008/08/introducing-ubiquity/) or your blog even. Ironic isn’t it. But it generates it for other pages like youtube, joystiq, and google blogs. hmm weird.
Winrich
31 Aug 08 at 9:58 pm
Thanks for the feedback. It seems to sometimes work, and sometimes now.
The weird thing, is if I install it, it wont work for my webpage. However, it i run it from the command editor, it does work.
I am trying to figure out what is going on, but if anyone has any ideas let me know.
mike chambers
mesh@adobe.com
mikechambers
31 Aug 08 at 10:33 pm
If anyone can figure out how to reproduce the steps to make the command stop working, please let me know.
It seems to just randomly not work sometimes (even on the same page).
Im guessing it might be a bug with Ubiquity, but I would like to try and track it down.
mike chambers
mesh@adobe.com
mikechambers
31 Aug 08 at 10:40 pm
Very interesting command. Is there a way to not save the last email used in the preview?
Matthew Keefe
31 Aug 08 at 11:08 pm
@matthew
–
Is there a way to not save the last email used in the preview?
–
I dont know. The Ubiquity extension does that, and not my command (I don’t like it either).
mike chambers
mesh@adobe.com
mikechambers
31 Aug 08 at 11:11 pm
A little more info.
I noticed something after I installed Growl. I’m getting a notification stating “Firebug Required Fol Full Usage” whenever I use the command. Hope this helps.
Winrich
31 Aug 08 at 11:11 pm
@Winrich
–
I noticed something after I installed Growl. I’m getting a notification stating “Firebug Required Fol Full Usage” whenever I use the command. Hope this helps.
–
Sorry about that. I left some debug info in the command, which is causing that issue. I will upload a new version shortly with that removed.
(Im still trying to track down the issue of the command not working sometimes).
mike chambers
mesh@adobe.com
mikechambers
31 Aug 08 at 11:21 pm
@mike – What about escaping the url/title? Could that maybe do something?
Matthew Keefe
31 Aug 08 at 11:30 pm
@matthew
Yeah, everything is escaped (I have checked about 10 times).
I think it might have something to do with the length of the mailto url being generated.
for example
On this page, it wont work. The generated URL is:
mailto:?subject=fyi%20%3A%20Mike%20Chambers%20%BB%20Blog%20Archive%20%BB%20Firefox%20Ubiquity%20Command%20%3A%20fyi&body=http%3A//www.mikechambers.com/blog/2008/08/31/firefox-ubiquity-command-fyi/%0A
However, on the main page of my blog it works
http://www.mikechambers.com/blog/
with the generated URL being much shorter:
mailto:?subject=fyi%20%3A%20Mike%20Chambers&body=http%3A//www.mikechambers.com/blog/%0A
The odd thing is that they both work when running directly from the built in ubiquity command editor.
The weird thing is that if i select some text on mikechambers.com/blog/ which results in a HUGE url, it still works.
mike chambers
mesh@adobe.com
mikechambers
1 Sep 08 at 12:50 am
ok. I found out the issue.
In the title for this page, I have this char:
»
which when passed through the escape function results in:
%BB
however, that is wrong, it should be:
%C2%BB
if I fixed that in the generated URL, then it works.
I need to now look at why it is being escaped wrong, and why it works locally but not installed.
This seems to only be an issue on Mac, and not on windows. This should be fixed now in the .87 version.
mike chambers
mesh@adobe.com
mikechambers
1 Sep 08 at 1:06 am
ok. I just uploaded a new version .86, which should fix the problem (at least with it working with my site).
If you find another site it doesnt work with, please post the URL here in the comments.
Thanks for all of the help…
mike chambers
mesh@adobe.com
mikechambers
1 Sep 08 at 1:48 am
Hi Mike,
Nice work! Seriously cool and excellent combination of functionality. Thanks.
I wonder when this functionality is going to break out of the browser?
John.
John Ballinger
1 Sep 08 at 3:53 am
A command line FF plugin? Keep me posted when the GUI comes out :-)
Sander
1 Sep 08 at 4:49 am
@John Ballinger
Aza (same developer) and his buddies have broke this out of the browser. Check out Enso @ http://www.humanized.com
Winrich
1 Sep 08 at 4:50 am
Nice command. Installed.
Btw, shouldn’t it be “code == joy” instead?
Julien Couvreur
1 Sep 08 at 3:38 pm
@Julien
–
Btw, shouldn’t it be “code == joy” instead?
–
Well, as off topic this is, I get a lot of comments on this.
From the docs:
–
==
equality Operator
Usage
expression1 == expression2
Tests two expressions for equality. The result is true if the expressions are equal.
–
–
=
assignment Operator
Usage
expression1 = expression2
Assigns the value of expression2 (the operand on the right) to the variable, array element, or property in expression1.
–
so,
code = joy
is saying that code is equal to the value of joy. i.e. I am say that code and joy are the same.
But,
code == joy
results in a Boolean, indicating whether or not the comparison is true. So by itself:
code == joy
could be either true or false.
By saying
code = joy
I am making it very clear that it is true, and thus leaving no ambiguity.
mike chambers
mesh@adobe.com
mikechambers
1 Sep 08 at 4:47 pm
When I select text on the page this command will not work (Windows 32Bit). This could be because I just use Gmail (not thunderbird or other external mail clients). Also, can you get it to open in a new Tab/Window when it does this (for those of us not using a client)
James
2 Sep 08 at 8:57 am
It looks very nice, but I get this message whenever I try the fyi command:
[Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMLocation.href]” nsresult: “0×80004005 (NS_ERROR_FAILURE)” location “JS frame :: XPCSafeJSObjectWrapper.cpp :: anonymous :: line 445″ data:no]
Running Firefox 3.0.1 on Linux
Jesper Holck
2 Sep 08 at 9:02 am
@James
–
When I select text on the page this command will not work (Windows 32Bit). This could be because I just use Gmail
–
Does it work if you dont select text?
mike chambers
mesh@adobe.com
mikechambers
2 Sep 08 at 10:04 am
Yes, I found out it just doesn’t seem to like more than one paragraph.
A quick suggestion, you could also put the URL that you enter as a link, would make it quite a bit better and I do think that the “email to” ubiquity command has the code already for that.
James
2 Sep 08 at 8:08 pm
@james
What do you mean by “put the url you enter as a link”?
Ill do some more testing around large amounts of text.
mike
mikechambers
2 Sep 08 at 10:59 pm
@Mike
Sorry, wasn’t very specific. When I FYI anything it will put the URL in the e-mail, but doesn’t make it a clickable link. So anyone I send that e-mail to will have to copy/paste the address to view said FYI page.
James
2 Sep 08 at 11:41 pm
Sorry for the double post here, could be that it’s pretty early in the morning or was this supposed to open my default mail program? If so, I’ve recently set up ThunderBird again and it doesn’t launch while using FYI. So if that was intended that for some reason didn’t happen :D
James
2 Sep 08 at 11:47 pm
@James
Ahh. ok.
I dont know if that is technically possible, as i have to use a mailto: url to actually call the email application.
I could possibly format the body as HTML (not sure how that works), but it would mean that:
1. anyone using plain text for email would get a bunch of HTML (not good)
2. the amount of data your could send to the email would be reduced.
Regardless, I will play around with it and see if I can come up with something that works.
Thanks for the feedback…
mike
mikechambers
2 Sep 08 at 11:48 pm
@Mike
True, the plain text email issue I thought about too, I’ve not been able to think of a way around it though.
Another quick idea to add in is the “auto-complete” feature so I don’t have to know my friend’s e-mail address to send them stuff (you know the people I’m talking about… those silly t3h.r0xorz type people)
(Ubiquity email does this already and I’m sure you could easily call this)
CmdUtils.CreateCommand({
name: “insert-email”,
takes: {”person”: noun_type_contact},
preview: “Inserts someone’s email address by name.”,
execute: function( email ) {
CmdUtils.setSelection( email.text );
}
})
James
3 Sep 08 at 12:24 am
Interesting, I will take a look at this plugin.
Although I usually have less steps, using both a clipboard manager (I can make several copies then paste them successively) and the handy Make Link plugin (can create an HTML (or BBCode, plain text, Markdown, etc.) link from the current URL (or the one on the pointed link) and the current page title (or the text in the pointed link, etc.).
Anyway, I am off to discover Ubiquity!
Philippe Lhoste
3 Sep 08 at 4:46 am
I can not get firefox 3 to subscribe to your page
Thank you
Darren Mccormac
15 Sep 08 at 6:48 pm
Is accidentally a gnus user reading this who knows to do it with gnus?
For open mailto links with gnus I have this little script:
#!/bin/bash
/usr/bin/emacsclient -e “(message-mail (substring \”$1\” 7))”
Then a mail with fyi looks like this:
To: me@mail.de?subject=fyi%20%3A%20Firefox%20Ubiquity%20Command%20%3A%20fyi%20at%20Mike%20Chambers&body=http%3A//www.mikechambers.com/blog/2008/08/31/firefox-ubiquity-command-fyi/%0A
Subject:
…
henry
harry myyers
7 Oct 08 at 9:29 am
Just a quick suggestion: that the snippet go above the URL. This way if the snippet is interesting to the reader they can proceed to the URL for the full story.
Cheers,
Nathan
madteckhead
11 Nov 08 at 4:00 pm
Hi,
thank you it’s working but…
i won’t remember the name of the command tomorrow!
Why “fyi” and not thunderbird or mail2 / mto or whatever more explicit?
Anis
11 Feb 09 at 4:49 pm
[...] idea came up, when I discovered the famous fyi Script by Mike Chambers – THE script to explain people what Ubiquity is good for by the way. Credits to Christian Sonne for [...]
Achim Bode » Blog Archive » Ubiquity-Script for documentation of your browsing in a wiki
21 Mar 09 at 3:58 am