Look at cers' reply.
On Wed, Jan 7, 2009 at 3:11 PM, Joe <[email protected]> wrote:
>
> Thanks a lot Fernando! That worked great! However, is there a better
> way to open a new window or tab? The process that I am using alerts
> FireFox's popup blocker. See code below:
>
> CmdUtils.CreateCommand({
> name: "submit-digg",
> execute: function() {
> var document = CmdUtils.getDocument();
> var window = CmdUtils.getWindow();
> var url='http://digg.com/submit?phase=2&url=' + window.location +
> '&title=' + document.title;
> window.open(url, 'test')
> }
> })
>
> On Jan 7, 11:11 am, "Fernando Takai" <[email protected]> wrote:
> > There's no document/window object within our sandbox. You have to access
> > them through CmdUtils.getDocument() and CmdUtils.getWindow().
> >
> > Cheers!
> >
> >
> >
> > On Wed, Jan 7, 2009 at 2:08 PM, Joe <[email protected]> wrote:
> >
> > > Hello everyone!
> >
> > > i am kind of a n00b around here, so please bear with me! I am
> > > currently trying to develop my first ubiquity command. For this
> > > command, i am trying to submit things to Digg. I understand that there
> > > is already a digg command, but I am taking this on as part of my
> > > learning process in the hopes that I can do cooler things in the
> > > future.
> >
> > > Below is my code. Can anyone tell me why it isn't working?
> >
> > > CmdUtils.CreateCommand({
> > > name: "submit-digg",
> > > execute: function() {
> > > var
> > > url='http://digg.com/submit?phase=2&url='+<http://digg.com/submit?phase=2&url=%27+>window.location
> > > +
> > > '&title=' + document.title;
> > > window.open(url, 'test')
> > > }
> > > })
> >
> > > Am I completely missing the point? If so whats the problem?
> >
> > --
> > Fernando "Takai"
> http://flickr.com/photos/supeertakaihttp://fernandotakai.jaiku.com
> >
> > Get Ubiquity:https://ubiquity.mozilla.com
> >
>
--
Fernando "Takai"
http://flickr.com/photos/supeertakai
http://fernandotakai.jaiku.com
Get Ubiquity: https://ubiquity.mozilla.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"ubiquity-firefox" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/ubiquity-firefox?hl=en
-~----------~----~----~----~------~----~------~--~---