CmdUtils.CreateCommand({
  names: ["Screeze"],
  description: "Prepares a thread on Screeze", 
  homepage: "http://screeze.com/",
  author: { name: "Osvaldo Rosado", email: "afrothunder@screeze.com"},
  help: "Type in Screeze then a topic name to prepare a thread with that name.",
  license: "MIT",
  arguments: [{role: "object",
               nountype: noun_arb_text,
               label: "Thread Title"}],
  preview: function( pblock, arguments ) {
    pblock.innerHTML = _("Will prepare a thread in General Discussions Titled: ") + arguments.object.text;
  },
  execute: function( arguments ) {
    var msg = arguments.object.text;
    displayMessage( "Screeze Thread Generated" );
Utils.openUrlInBrowser("http://screeze.com/forum/newthread.php?fid=6&message=Post Goes Here&previewpost=1&subject=" + encodeURIComponent(msg));
  }
});

CmdUtils.CreateCommand({
  names: ["post on screeze"],
  description: "Shares a webpage on Screeze", 
    homepage: "http://screeze.com/",
  author: { name: "Osvaldo Rosado", email: "afrothunder@screeze.com"},
  help: "Type in post on screeze as then a topic name to prepare a thread about the current url with that name.",
  license: "MIT",
  arguments: [{role: "object",
               nountype: noun_type_url,
               label: "URL"},{role: "alias",
               nountype: noun_arb_text,
               label: "Thread Title"}],
  preview: function( pblock, arguments ) {
    pblock.innerHTML = _("Will prepare a thread in Things That Compute Titled: ") + arguments.alias.text;
  },
  execute: function( arguments ) {
    var msg = arguments.object.text;
    displayMessage( "Screeze Thread Generated" );
Utils.openUrlInBrowser("http://screeze.com/forum/newthread.php?fid=6&message=Hey! I found this site today and thought it was interesting. You should check it out.  "+ encodeURIComponent("[align=left]"+msg+"[/align][align=right]--Generated by the Screeze Ubiquity Command[/align]")+"&previewpost=1&subject="+encodeURIComponent(arguments.alias.text)+"");
  }
});
