open a tab and write to it

33 views
Skip to first unread message

yadnem

unread,
Oct 29, 2008, 4:47:51 PM10/29/08
to ubiquity-firefox

Hello,

First, would like to say that ubiquity is a really interesting
development
... looking forward to seeing how it develops further.

I have a question : I want to open a new (empty) tab and write some
stuff into it as the result of the command execution. Does someone
have some example which does this they could kindly share ? I tried a
number of ways to achieve this, and I looked for an existing command
as an example, but so, far I didn't crack it.

Thanks,

Roger

Blair McBride

unread,
Oct 31, 2008, 12:42:36 AM10/31/08
to ubiquity...@googlegroups.com
Sounds like http://labs.toolness.com/trac/ticket/390

I saw that a couple of days ago, and I still haven't figured out a
robust and easy way of doing it. Its certainly something that Ubiquity
doesn't yet cater for.

I suppose opening about:blank may work, but you'd need to only alter the
page once the "load" event is fired. I haven't checked this, but that
may mean you won't be able to go through FUEL (ie,
Application.activeWindow.activeTab).

I'll have a think on this, and post anything I come up with.

- Blair

yadnem

unread,
Oct 31, 2008, 8:22:25 AM10/31/08
to ubiquity-firefox


On Oct 31, 5:42 am, Blair McBride <unfocu...@gmail.com> wrote:
> Sounds likehttp://labs.toolness.com/trac/ticket/390

it does !! exactly my requirements too.

> I saw that a couple of days ago, and I still haven't figured out a
> robust and easy way of doing it. Its certainly something that Ubiquity
> doesn't yet cater for.
>
> I suppose opening about:blank may work, but you'd need to only alter the
> page once the "load" event is fired. I haven't checked this, but that
> may mean you won't be able to go through FUEL (ie,
> Application.activeWindow.activeTab).

i tried about:blank but could'nt get it to work.
I suppose I could just grab a 'empty' page from the internet, and then
write new content to it.

but, then the URL looks confusing for a user ...

> I'll have a think on this, and post anything I come up with.

that's great. Thanks.

Roger

yadnem

unread,
Oct 31, 2008, 10:23:49 AM10/31/08
to ubiquity-firefox

actually, one more quick reply. is it possible to put a
"blank_canvas.html" somewhere inside the ubiquity plugin ? then at
least there is the option to pull an expected-to-be-there starting-
point document ... until something else comes along. would that
work ?

Roger

Blair McBride

unread,
Nov 1, 2008, 2:22:34 AM11/1/08
to ubiquity...@googlegroups.com
That's a great idea - I've added a comment to the ticket I mentioned,
suggesting this course of action. See
http://labs.toolness.com/trac/ticket/390#comment:1

This of course means that you'll have to wait until 0.1.3 if you wish to
use that method.

Another way would be to host a skeleton HTML file on a website
somewhere, open a tab for that, wait for it to load, then make
alterations. But of course, you'd have to do all that manually. 0.1.3
should have an API function to do all that stuff for you.


- Blair

Fernando Takai

unread,
Nov 1, 2008, 10:49:34 AM11/1/08
to ubiquity...@googlegroups.com
At the end of this (https://developer.mozilla.org/en/FUEL/BrowserTab) page there's a code sample, showing how to open a page and modifing it's contents.

I did this simple PoC showing how we could do this kind of thing: http://gist.github.com/21530
--
Fernando "Takai"
http://flickr.com/photos/supeertakai
http://fernandotakai.wordpress.com
http://fernandotakai.jaiku.com

canadaduane

unread,
Nov 1, 2008, 12:00:10 PM11/1/08
to ubiquity-firefox
Nice! Thanks, all. I'm thrilled to have found Ubiquity, and this
just adds to the number of things I can do with it.

-- Duane

Blair McBride

unread,
Nov 1, 2008, 5:21:37 PM11/1/08
to ubiquity...@googlegroups.com
Ah, well if that works afterall, then good :)

- Blair

yadnem

unread,
Nov 27, 2008, 9:07:47 AM11/27/08
to ubiquity-firefox





> > -- Duane
>
> > On Nov 1, 8:49 am, "Fernando Takai"<fernando.ta...@gmail.com>  wrote:
> >> At the end of this (https://developer.mozilla.org/en/FUEL/BrowserTab) page
> >> there's a code sample, showing how to open a page and modifing it's
> >> contents.
>
> >> I did this simple PoC showing how we could do this kind of thing:http://gist.github.com/21530


Hi all,

this works - and works well ! thanks.
Fernando, what about if I wanted to open the page into a sidebar
... is that possible as well ?

Thanks,

Roger
> >> Fernando "Takai"http://flickr.com/photos/supeertakaihttp://fernandotakai.wordpress.co...
>
>
Reply all
Reply to author
Forward
0 new messages