Install commands from an extension?

0 views
Skip to first unread message

bahuvrihi

unread,
Nov 19, 2008, 12:41:24 PM11/19/08
to ubiquity-firefox
Is there a way to install a ubiquity command when you install an
extension?

Atul Varma

unread,
Dec 1, 2008, 11:01:14 AM12/1/08
to ubiquity...@googlegroups.com
This is definitely possible, but it'd involve using Ubiquity's internal API, which has been subject to a lot of change recently.  Are you working on a particular extension that you'd like to register Ubiquity commands with?

- Atul

bahuvrihi

unread,
Dec 1, 2008, 5:53:19 PM12/1/08
to ubiquity-firefox
Yes, but it's one that I'm developing for use in my lab... it's not an
extension out in the wild. The extension is basically a dispatch
between a scripting library and firefox... the extension has various
configurations for the scripts and I'm planning on using ubiquity as a
kind of command line substitute. The advantage is that it'll feel
more like an application to non-programmers and it will allow me to
pull up html views which would obviously not be there on the command
line.

Obviously it would be nice to just install ubiquity and the extension,
rather than adding an additional install for the commands.

Abimanyu Raja

unread,
Dec 2, 2008, 5:59:31 AM12/2/08
to ubiquity...@googlegroups.com
Try this code:

      Components.utils.import("resource://ubiquity-modules/setup.js");
      var linkRelCodeSvc = UbiquitySetup.createServices().linkRelCodeService;
      linkRelCodeSvc.addMarkedPage({url: "",
                                    sourceCode: "",
                                    canUpdate: true,
                                    title: ""});

I haven't tested this but it might work.

- Abi

2008/12/2 bahuvrihi <simon.a...@gmail.com>

Blair McBride

unread,
Dec 5, 2008, 4:25:24 AM12/5/08
to ubiquity...@googlegroups.com
Eventually, Ubiquity should provide a stable API to make this easy for
authors of other extensions.

Ticket for this is: http://labs.toolness.com/trac/ticket/430

- Blair
Reply all
Reply to author
Forward
0 new messages