CmdUtils.CreateCommand({
  name: "durl",
  author: { name: "Yu, Seungkeun", email: "suguni@gmail.com"},
  takes: {"url to shorten": noun_arb_text},
  icon: "http://durl.kr/images/durl.png",
  preview: "Replaces the selected URL with a durl.",
  execute: function( urlToShorten ) {
    var create = "http://durl.kr/api/Create.do";
    var params = {longurl: encodeURI(urlToShorten.text), type:'json'};
    jQuery.get(create, params, function(data, status) {
      CmdUtils.setSelection(data.shortUrl);
    }, 'json');
  }
});

