Report abuse

CmdUtils.CreateCommand({
  name: "get-dents",
  //takes: {num_posts: noun},
  homepage: "http://theunfocused.net/moz/ubiquity/verbs/",
  author: {name: "Remy Porter", homepage: "http://identi.ca/t3knomanser"},
  license: "MPL",

  preview: function(previewBlock) {
    var dent_template = "" +
     "${user}:${dent}";
    //previewBlock.innerHTML = "" + CmdUtils.renderTemplate(dent_template, {user:"Joebob",status:"Testing dent"}) + "
"; var numPosts = 10; var updateURL; updateURL = LACONICA_ROOT + "friends_timeline.xml?count=" + numPosts; jQuery.ajax({ type: "GET", url: updateURL, success: function(xml) { var body = ""; jQuery("status", xml).each(function() { body += CmdUtils.renderTemplate(dent_template, {user:jQuery("screen_name", this).text(), dent:jQuery("text", this).text(), imageUrl:jQuery("profile_image_url", this).text()} ); }); previewBlock.innerHTML = "" + body + "
"; }, error: function() {displayMessage("Failed getting dents."); } }); } });