Microformats API in Firefox 3
The group you are posting to is a
Usenet group . Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
From:
Martin McEvoy <mar... @weborganics.co.uk>
Date: Mon, 01 Sep 2008 19:56:32 +0100
Local: Mon, Sep 1 2008 2:56 pm
Subject: Microformats API in Firefox 3
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
Pfefferle <pfeffe... @gmail.com>
Date: Sat, 6 Sep 2008 13:33:51 -0700 (PDT)
Local: Sat, Sep 6 2008 4:33 pm
Subject: Re: Microformats API in Firefox 3
It is possible... Here is some example code:
Components.utils.import("resource://gre/modules/Microformats.js");
CmdUtils.CreateCommand({
name: "count-hcards",
execute: function() {
var doc = Application.activeWindow.activeTab.document;
var uFcount = Microformats.count('hCard', doc);
displayMessage( uFcount );
}
})
On 1 Sep., 20:56, Martin McEvoy <mar
... @weborganics.co.uk> wrote:
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
Guy Fraser <gfra... @adaptavist.com>
Date: Sun, 07 Sep 2008 00:25:54 +0100
Local: Sat, Sep 6 2008 7:25 pm
Subject: Re: [ubiquity] Re: Microformats API in Firefox 3
I'd love to see a load of nouns based on uF's - that would make
accessing uF's in verbs trivially easy...
Pfefferle wrote:
> It is possible... Here is some example code:
> Components.utils.import("resource://gre/modules/Microformats.js");
> CmdUtils.CreateCommand({ > name: "count-hcards", > execute: function() { > var doc = Application.activeWindow.activeTab.document; > var uFcount = Microformats.count('hCard', doc); > displayMessage( uFcount ); > } > })
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
Blair McBride <unfocu... @gmail.com>
Date: Tue, 09 Sep 2008 00:40:45 +1200
Local: Mon, Sep 8 2008 8:40 am
Subject: Re: [ubiquity] Re: Microformats API in Firefox 3
I agree - its an easy way for Ubiquity to get extra contextual information.
There's already some code in Ubiquity dealing with Microformats, but I'm not even sure if its loaded anywhere. See http://hg.toolness.com/ubiquity-firefox/file/tip/ubiquity/chrome/cont...
- Blair
Guy Fraser wrote:
> I'd love to see a load of nouns based on uF's - that would make
> accessing uF's in verbs trivially easy...
> Pfefferle wrote: >> It is possible... Here is some example code:
>> Components.utils.import("resource://gre/modules/Microformats.js");
>> CmdUtils.CreateCommand({ >> name: "count-hcards", >> execute: function() { >> var doc = Application.activeWindow.activeTab.document; >> var uFcount = Microformats.count('hCard', doc); >> displayMessage( uFcount ); >> } >> })
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
Martin McEvoy <mar... @weborganics.co.uk>
Date: Mon, 08 Sep 2008 14:17:58 +0100
Local: Mon, Sep 8 2008 9:17 am
Subject: Re: [ubiquity] Re: Microformats API in Firefox 3
Hmm this is interesting ;-)
Guy Fraser wrote:
> I'd love to see a load of nouns based on uF's - that would make
> accessing uF's in verbs trivially easy...
> Pfefferle wrote:
>> It is possible... Here is some example code:
>> Components.utils.import("resource://gre/modules/Microformats.js");
>> CmdUtils.CreateCommand({ >> name: "count-hcards", >> execute: function() { >> var doc = Application.activeWindow.activeTab.document; >> var uFcount = Microformats.count('hCard', doc); >> displayMessage( uFcount ); >> } >> })
Try this:
Components.utils.import("resource://gre/modules/Microformats.js"); CmdUtils.CreateCommand({ name: "hcard-test", execute: function() { var doc = Application.activeWindow.activeTab.document; var hCards = Microformats.get('hCard', doc); hCards.forEach(function(hcard) { displayMessage([ 'Name: '+hcard.fn, ].join('n'));
}); } })
More to come ....
Martin McEvoy
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
Martin McEvoy <mar... @weborganics.co.uk>
Date: Mon, 08 Sep 2008 19:15:03 +0100
Local: Mon, Sep 8 2008 2:15 pm
Subject: Re: [ubiquity] Re: Microformats API in Firefox 3
Hello All
There Is A Page on the Microformats Wiki for anyone Interested in adding The Microformats-API to ubiquity (and also a few Microformats specific commands)
http://microformats.org/wiki/ubiquity
Best Wishes
Martin McEvoy
Blair McBride wrote:
> I agree - its an easy way for Ubiquity to get extra contextual information.
> There's already some code in Ubiquity dealing with Microformats, but I'm > not even sure if its loaded anywhere. See > http://hg.toolness.com/ubiquity-firefox/file/tip/ubiquity/chrome/cont...
> - Blair
> Guy Fraser wrote:
>> I'd love to see a load of nouns based on uF's - that would make >> accessing uF's in verbs trivially easy...
>> Pfefferle wrote:
>>> It is possible... Here is some example code:
>>> Components.utils.import("resource://gre/modules/Microformats.js");
>>> CmdUtils.CreateCommand({ >>> name: "count-hcards", >>> execute: function() { >>> var doc = Application.activeWindow.activeTab.document; >>> var uFcount = Microformats.count('hCard', doc); >>> displayMessage( uFcount ); >>> } >>> })
You must
Sign in before you can post messages.
You do not have the permission required to post.