Hi everyone, i discovered Ubiquity today and as soon as i could i
started messing around with the command creation tool. I'm trying to
create a comman called 'open', which opens in a new tab the selected
bookmark, or in case you're selecting a bookmark folder, all the
bookmarks in it.
CmdUtils.CreateCommand({
name: "open",
description: "Opens the page of the named bookmark.",
help: "Type 'open' and then the name of one of your bookmarks/
bookmark folder",
takes: {"input": noun_arb_text},
preview: function( pblock, input ) {
var template = "You want to open ${name}";
pblock.innerHTML = CmdUtils.renderTemplate(template, {"name":
input.text});
},
execute: function(input) {
for ( var names in Application.bookmarks.menu.children ) {
if ( names.title.match(input.text))
if ( names.description.match("folder") )
for ( var books in names.children ) Utils.openUrlInBrowser
(books.uri);
else Utils.openUrlInBrowser(names.uri);
}
}
});
This doesn't work. I've searched in the FUEL libraries for the
bookmarks proprieties, though i'm not really sure they are 100%
correct ^_^"
I wanted also to add, as preview, a preview of the selected pages and
also a check for the names, but i'll ( try ) to work on that after the
command itself works xD
Thanks for help in advance =D
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---