Is anyone working on building the Microformats API[1] into Ubiquity?
It would be very cool if someone was Microformats would work very well
in the map command, it could detect geo[2] locations in users pages,
and email-to could work on hcards[3].
[1] http://developer.mozilla.org/en/Using_microformats
[2] http://microformats.org/wiki/geo
[3] http://microformats.org/wiki/hcard
Best Wishes
Martin McEvoy
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/content/microformat_cmds.js
- Blair
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
>
>
> >
>
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