Skip to content

Instantly share code, notes, and snippets.

@snaka
Created September 3, 2008 16:25
Show Gist options
  • Save snaka/8618 to your computer and use it in GitHub Desktop.
Save snaka/8618 to your computer and use it in GitHub Desktop.
// Ubiquity command (in progress) : add item to check*pad
/*
To do : Accept to japanese
*/
CmdUtils.CreateCommand({
name: "check-pad",
description: "check*pad",
help: "simple todo list",
icon: "http://www.checkpad.jp/favicon.ico",
takes: {parameter: noun_arb_text},
preview: function(pblock, directObject) {
pblock.innerHTML = "Add to-do item : " + directObject.text;
},
execute: function(directObject) {
displayMessage(directObject.text);
jQuery.post(
'http://www.checkpad.jp/?mode=ms&act=add&pjt_id=xxxxxx', /* YOU MUST CHANGE pjt_id */
{ttl: directObject.text},
function(data, textStatus) {
displayMessage(textStatus);
}
);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment