On Wed, Jan 21, 2009 at 2:46 AM, Joe <[email protected]> wrote:

>
> Does anyone know of a method that you could grab the URL of a link
> with a ubiquity command? Like for example i want to highlight a link,
> and then use the link's url as a variable in a command i am working
> on. any ideas?
>

This would be a simple example:
CmdUtils.CreateCommand({
  name: "geturl",
  takes: {'sel': noun_arb_text},
  execute: function(sel) {
    var html = sel.html;
    var links = jQuery(html).find('a');
    if (links.length > 0)
      displayMessage(links[0].href);
  }
});

Hope it helps
-- cers / Christian Sonne



>
> As always, thanks so much guys!
>
> Joe
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to