Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
name: "twitter-search",
url: "{QUERY}",
icon: "",
description: "Searches twitter for your words.",
preview: function(pBlock, directObject) {
var query = directObject.text;
pBlock.innerHTML = "Searching for...";
var url = "";
var params = {q: query};
var pTemplate = '<table>{for result in results}<tr><td><img src="${result.profile_image_url}" /></td><td><a href="${result.from_user}/statuses/${}" style="color: yellow;">${result.from_user}</a>: ${result.text}</td></tr>{/for}</table>';
jQuery.get(url, params, function(response) {
var json = Utils.decodeJson(response);
pBlock.innerHTML = CmdUtils.renderTemplate(pTemplate, json);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment