CmdUtils.CreateCommand({
  name: "arrow",
  takes: {"url to shorten": noun_type_url},
  icon: "http://tinyarro.ws/favicon.ico",
  description: "Replaces the selected URL with a <a href=\"http://tinyarro.ws\">➡.ws URL</a>",
  preview: "Replaces the selected URL with a URL shortened with &#x27A1;.ws URL.",
  
  execute: function( urlToShorten ) {
    //escaping urlToShorten will not create the right ➡.ws url
    var baseUrl = "http://tinyarro.ws/api-create.php?url=";
    jQuery.get( baseUrl + urlToShorten.text, function( arrow ) {
      CmdUtils.setSelection( arrow );
      CmdUtils.copyToClipboard( arrow );
    });
  }
});
