I'm new to this group, and relatively new to ubiquity very creation,
so if this is the wrong place to post, please tell me.
I'm working on creating a more intuitive and frankly, useful get-
lyrics command. The one in the tutorial is essentially a modified
google search.
My code is partially based off of the get-lyrics command and started
as template based. However, I am unable to get the command to even
register in Ubiquity. It also doesn't show on my command list, while
the .js file is in my subscriptions feed. I would not be surprised if
this were code syntax error on my part as I'm not too used to
javascript either.
Any and all help given is much appreciated.
Code is as follows:
CmdUtils.CreateCommand({
name: "getlyric",
icon: "http://networkofdoom.net/~halosghost/favicon.ico",
homepage: "http://networkofdoom.net/~halosghost/",
author: { name: "HalosGhost", email: "[email protected]"},
license: "BSD",
description: "a simpler faster way to retrieve lyrics",
help: "command (artistname) (songname)",
preview: function( pblock, directObject, indirectObject ) {
searchText = jQuery.trim(directObject.text);
searchText1 = jQuery.trim(indirectObject.text);
if(searchText.length < 1) {
pblock.innerHTML ="Searches and displays, if found, lyrics for a
song";
return;
},
execute: function(directObject, indirectObject) {
var url = "http://www.azlyrics.com/lyrics/{QUERY1}/{QUERY2}.html"
var query1 = directObject.text;
var query2 = indirectObject.text;
var urlString = url.replace("{QUERY1}", query1);
var urlString = url.replace("{QUERY2}", query2);
Utils.openUrlInBrowser(urlString);
}
});
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---