Suggestions for Ubiquity commands

0 views
Skip to first unread message

Abi

unread,
Jul 19, 2008, 9:10:00 PM7/19/08
to ubiquity-firefox
Hey everyone,

I have committed a few commands (like "lyrics" which searches for the
lyrics of the currently playing song) that allow you to control other
extensions. So, if you have FoxyTunes/Del.icio.us/Stumble Upon
installed, these commands will automatically be visible to you. The
main advantage of controlling other extensions with Ubiquity is that
you save screen space by removing their toolbars and still being able
to access their core functionality. I have also added a "close related
tabs" command.

Because the Ubiquity command API is very powerful, there are still
numerous commands that could be written. So, if you have any
suggestions for commands that you think might be useful or just cool,
please post here.

Cheers,
Abi

Aza

unread,
Jul 21, 2008, 1:08:12 PM7/21/08
to ubiquity...@googlegroups.com
Hey Abi,

Those are truly excellent commands. (Although, having not yet looked at the "close related tabs" code, I am not sure what it does... it may be worth putting the names of the tabs it will close in the preview area).

Atul put forward the idea that a number of FF extensions could be entirely redone as Ubiquity commands. Or done like you did for FoxyTunes.

Here are a list of commands to get this thread going:

* Commands for all of the menu items (so that I never have to reach for the mouse to menu again). Sandro mentioned this recently.
* Flickr integration (ability to inject pictures/slideshows and post found images to Flickr)
* Twitter integration
* Program launcher (When in Chrome, JS can launch other applications)
* Go command (for switching between tabs by name)
* Search command (allows you to search for text in any open tab, and then navigate you there)
* Blog integration (select a chunk of text or an image and then blog about it in your favorite blog software)
* Flock stuff (be inspired by whatever seems to be actually useful in Flock)
* BlueOrganizer (be inspired by https://addons.mozilla.org/en-US/firefox/addon/3481 and it's somewhat semantic knowledge)
* Fly command (possibly using the Kayak API) to make booking flights easier
* Take inspiration from Clipmarks (https://addons.mozilla.org/en-US/firefox/addon/1407)
* Ability to take snapshots of the current window
* Ability to annotate web pages and then share those annotations


-- aza | ɐzɐ --

Abi

unread,
Jul 30, 2008, 1:32:09 AM7/30/08
to ubiquity-firefox
Hey Aza,

Thanks for the great suggestions. "Close related tabs" already shows a
preview of the tabs. Also, I added a Go (currently called go.to.tab)
command ,as you suggested, for switching between tabs. But in its
rudimentary form, there's no way to switch to the second best match
and the algorithm to find the tab is just a simple match. I'll work on
improving this.

On Jul 22, 1:08 am, Aza <a...@mozilla.com> wrote:
> Hey Abi,
>
> Those are truly excellent commands. (Although, having not yet looked at the
> "close related tabs" code, I am not sure what it does... it may be worth
> putting the names of the tabs it will close in the preview area).
>
> Atul put forward the idea that a number of FF extensions could be entirely
> redone as Ubiquity commands. Or done like you did for FoxyTunes.
>
> Here are a list of commands to get this thread going:
>
> * Commands for all of the menu items (so that I never have to reach for the
> mouse to menu again). Sandro mentioned this recently.
> * Flickr integration (ability to inject pictures/slideshows and post found
> images to Flickr)
> * Twitter integration
> * Program launcher (When in Chrome, JS can launch other applications)
> * Go command (for switching between tabs by name)
> * Search command (allows you to search for text in any open tab, and then
> navigate you there)
> * Blog integration (select a chunk of text or an image and then blog about
> it in your favorite blog software)
> * Flock stuff (be inspired by whatever seems to be actually useful in Flock)
> * BlueOrganizer (be inspired byhttps://addons.mozilla.org/en-US/firefox/addon/3481and it's somewhat
> semantic knowledge)
> * Fly command (possibly using the Kayak API) to make booking flights easier
> * Take inspiration from Clipmarks (https://addons.mozilla.org/en-US/firefox/addon/1407)
> * Ability to take snapshots of the current window
> * Ability to annotate web pages and then share those annotations
>
> -- aza | ɐzɐ --
>

Blair McBride

unread,
Jul 30, 2008, 8:48:42 AM7/30/08
to ubiquity-firefox
Here's a Twitter command:
http://theunfocused.net/moz/ubiquity/verbs/twitter.js

Basic usage - it can only be used to update your Twitter status.

Note that you need your Twitter user/pass to be stored in the password
manager, since Twitter's API requires it to be sent explicitly (don't
worry - its over HTTPS). I might add a fallback to using the user/pass
entry dialog. But I think it'd be unwise to allow it to be entered in
plain text as part of the command.


- Blair




On Jul 22, 5:08 am, Aza <a...@mozilla.com> wrote:
> Hey Abi,
>
> Those are truly excellent commands. (Although, having not yet looked at the
> "close related tabs" code, I am not sure what it does... it may be worth
> putting the names of the tabs it will close in the preview area).
>
> Atul put forward the idea that a number of FF extensions could be entirely
> redone as Ubiquity commands. Or done like you did for FoxyTunes.
>
> Here are a list of commands to get this thread going:
>
> * Commands for all of the menu items (so that I never have to reach for the
> mouse to menu again). Sandro mentioned this recently.
> * Flickr integration (ability to inject pictures/slideshows and post found
> images to Flickr)
> * Twitter integration
> * Program launcher (When in Chrome, JS can launch other applications)
> * Go command (for switching between tabs by name)
> * Search command (allows you to search for text in any open tab, and then
> navigate you there)
> * Blog integration (select a chunk of text or an image and then blog about
> it in your favorite blog software)
> * Flock stuff (be inspired by whatever seems to be actually useful in Flock)
> * BlueOrganizer (be inspired byhttps://addons.mozilla.org/en-US/firefox/addon/3481and it's somewhat
> semantic knowledge)
> * Fly command (possibly using the Kayak API) to make booking flights easier
> * Take inspiration from Clipmarks (https://addons.mozilla.org/en-US/firefox/addon/1407)
> * Ability to take snapshots of the current window
> * Ability to annotate web pages and then share those annotations
>
> -- aza | ɐzɐ --
>

Aza

unread,
Jul 30, 2008, 12:30:39 PM7/30/08
to ubiquity...@googlegroups.com
Sweet! Now I know what the close related tabs does :) Useful!

Funnily enough, I committed a "tab" command which does exactly that on Monday. I like your name much better. I did it by implementing a tab noun type, so it does the switching to other matches automatically. Check it out, and feel free to improve (it uses the same simplistic match algorithm).

-- aza | ɐzɐ --

Aza

unread,
Jul 30, 2008, 4:34:06 PM7/30/08
to ubiquity...@googlegroups.com
Hi Blair,

This is great. I think it shows that everything is coming together nicely.

The only problem, is that I haven't been able to get the command to send get my password. FF knows the password -- when I go there it pre-fills my user name and such -- yet I always get the "Login for Twitter not found" message.

I'd love to demo this tomorrow. Any chance you'll be able to figure out what's going on?

-- aza | ɐzɐ --

Blair McBride

unread,
Jul 30, 2008, 7:44:57 PM7/30/08
to ubiquity-firefox
The Friday demo, huh? Cool. Wish I could come to those... you Labs
guys seem to know how to throw a get-together ;-)

Unfortunately, there are so many URLs/form URLs that you can login
using - and nsILoginManager.findLogins() only handles *exact* matches.
I'll have a look into how the password manager UI does it. I think a
version of this getLoginInfo() function should go into cmdutils.js to
complement getCookie().

To help with debugging - what URL do you use to log into Twitter?

- Blair


On Jul 31, 8:34 am, Aza <a...@mozilla.com> wrote:
> Hi Blair,
>
> This is great. I think it shows that everything is coming together nicely.
>
> The only problem, is that I haven't been able to get the command to send get
> my password. FF knows the password -- when I go there it pre-fills my user
> name and such -- yet I always get the "Login for Twitter not found" message.
>
> I'd love to demo this tomorrow. Any chance you'll be able to figure out
> what's going on?
>
> -- aza | ɐzɐ --
>

Abi

unread,
Jul 30, 2008, 8:49:45 PM7/30/08
to ubiquity-firefox
Hey Blair,

I'm having the same problems as Aza. My twitter login URL is http://twitter.com.

I was wondering if you could use the session cookie instead for the
login. Although it is not officially supported, according to
https://twitter.pbwiki.com/API%20Docs#LoginAuthorization , you should
be able to do this. So, if the cookie is not present, you could just
redirect to the Twitter homepage for the user to login.

Cheers,
Abi

Aza

unread,
Jul 30, 2008, 9:50:18 PM7/30/08
to ubiquity...@googlegroups.com
We use the cookie thing fairly often in our commands. Because you are logged in, it general just works (it also means that if you log out, then a 2nd party using your computer couldn't Twitter as you).

You could just force a post/get on the Twitter page.

-- aza | ɐzɐ --

Abi

unread,
Jul 30, 2008, 9:58:25 PM7/30/08
to ubiquity-firefox
I got your Twitter command to work! :)

The problem seems to be that sometimes the formSubmitURL and the
hostname are not the same (reference: http://developer.mozilla.org/en/docs/Using_nsILoginManager).
On my computer, the password is stored for hostname= http://twitter.com
but the formSubmitURL is https://twitter.com . So, the fuzzy search
for logins should actually try all 16 possible combinations.

Also, if the Twitter password cannot be found, instead of returning
"Login for Twitter not found - status not updated" , you should
continue to send the request with any random login info and then, the
login prompt will pop up automatically so the user cannot enter the
right information.

Cheers,
Abi

On Jul 31, 8:49 am, Abi <abimanyur...@gmail.com> wrote:
> Hey Blair,
>
> I'm having the same problems as Aza. My twitter login URL ishttp://twitter.com.
>
> I was wondering if you could use the session cookie instead for the
> login. Although it is not officially supported, according tohttps://twitter.pbwiki.com/API%20Docs#LoginAuthorization, you should

Blair McBride

unread,
Jul 30, 2008, 11:07:17 PM7/30/08
to ubiquity-firefox
Grr... Twitter's API is NOT standardized/unambiguous in some places...
and in some cases, the docs are just plain wrong. Anyway...

I've reverted back to using Cookies - though I dislike using an
unsupported method. If that doesn't work, it should automatically
prompt for your user/pass.

I've also tidied up the command preview. It now better matches other
command previews (we really need a set standard for this!). And it
will now explicitly warn you when characters will get truncated.

I've uploaded the new version. Same URL as before, so Ubiquity should
just automatically see the changes on restart (we need a way to
explicitly re-fetch remote commands).

Are there any additional Twitter things people would like to be able
to do? For example, check the current status of a specific friend. I'm
not a big user of Twitter myself, so don't know the common usage
patterns.

- Blair


On Jul 31, 1:58 pm, Abi <abimanyur...@gmail.com> wrote:
> I got your Twitter command to work! :)
>
> The problem seems to be that sometimes the formSubmitURL and the
> hostname are not the same (reference:http://developer.mozilla.org/en/docs/Using_nsILoginManager).
> On my computer, the password is stored for hostname=http://twitter.com
> but the formSubmitURL ishttps://twitter.com. So, the fuzzy search

Blair McBride

unread,
Jul 31, 2008, 5:31:42 AM7/31/08
to ubiquity-firefox
There's already a command to add an event to Google Calendar. But I
don't use that :) So... here's a command to add an event to your
30Boxes calendar, using the 30Boxes onebox.

http://theunfocused.net/moz/ubiquity/verbs/30boxes.js

Unfortunately, there's almost *no* error checking - since the I can't
(easily) use the official API. The API doesn't allow automatic
authorization by a cookie or user/pass - it requires user
intervention. Which kinda... sucks. I'm going to investigate it
further, and see what I can do.

- Blair


On Jul 22, 5:08 am, Aza <a...@mozilla.com> wrote:
> Hey Abi,
>
> Those are truly excellent commands. (Although, having not yet looked at the
> "close related tabs" code, I am not sure what it does... it may be worth
> putting the names of the tabs it will close in the preview area).
>
> Atul put forward the idea that a number of FF extensions could be entirely
> redone as Ubiquity commands. Or done like you did for FoxyTunes.
>
> Here are a list of commands to get this thread going:
>
> * Commands for all of the menu items (so that I never have to reach for the
> mouse to menu again). Sandro mentioned this recently.
> * Flickr integration (ability to inject pictures/slideshows and post found
> images to Flickr)
> * Twitter integration
> * Program launcher (When in Chrome, JS can launch other applications)
> * Go command (for switching between tabs by name)
> * Search command (allows you to search for text in any open tab, and then
> navigate you there)
> * Blog integration (select a chunk of text or an image and then blog about
> it in your favorite blog software)
> * Flock stuff (be inspired by whatever seems to be actually useful in Flock)
> * BlueOrganizer (be inspired byhttps://addons.mozilla.org/en-US/firefox/addon/3481and it's somewhat
> semantic knowledge)
> * Fly command (possibly using the Kayak API) to make booking flights easier
> * Take inspiration from Clipmarks (https://addons.mozilla.org/en-US/firefox/addon/1407)
> * Ability to take snapshots of the current window
> * Ability to annotate web pages and then share those annotations
>
> -- aza | ɐzɐ --
>

Abi

unread,
Jul 31, 2008, 11:20:51 AM7/31/08
to ubiquity-firefox
I think the ones I most often use would be to check the current status
of a specific friend (or maybe, the last 3 statuses). The ability to
check your friends timeline as a whole would also be nice.

Cheers,
Abi
Reply all
Reply to author
Forward
0 new messages