CmdUtils.CreateCommand(
            {
                name:        "mac",
                takes:       {"function": noun_arb_text},
                icon:        "http://standards.ieee.org/favicon.ico";,
                homepage:    "http://standards.ieee.org/index.html";,
                author:      {name: "Dragomir Manolov", email:
"[email protected]"},
                license:     "FREE",
                description: "Search mac adress functions",
                help:        "Select a mac adress last octet
function",
                execute: function(directObject)
                    {
       var url       = "http://standards.ieee.org/cgi-bin/ouisearch?
{QUERY}"

                    var str=directObject.text;
                    str= str.slice(0,8);
                    str= str.replace(":","-")
                    str = str.replace(":","-");

       var urlString = url.replace("{QUERY}", str);
                    Utils.openUrlInBrowser(urlString);
                    },
                preview: function(pblock, directObject)
                {
                    searchText = jQuery.trim(directObject.text);

                    if(searchText.length <= 0)
                    {
                      pblock.innerHTML = "Search mac function";
                      return;
                    }

                    var previewTemplate = "Search mac <b>${query}</
b>";
                    var previewData     = {query: searchText};
                    pblock.innerHTML    = CmdUtils.renderTemplate
(previewTemplate, previewData);
                }
            });



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