Changes

Jump to: navigation, search

Labs/Ubiquity/Ubiquity 0.5 Author Tutorial

17 bytes removed, 02:38, 29 July 2010
TinyURL: Network Calls and jQuery (and the URL noun type): arguments -> args
CmdUtils.CreateCommand({
names: ["tinyurl"],
description: "Replaces the selected URL with a TinyUrl.",
arguments: [{role: "object",
nountype: noun_type_url,
label: "url to shorten"}],
preview: "Replaces the selected URL with a TinyUrl.", execute: function( arguments args) {
var baseUrl = "http://tinyurl.com/api-create.php";
var params = {url: argumentsargs.object.text}; jQuery.get( baseUrl, params, function( tinyUrl ) { CmdUtils.setSelection( tinyUrl ); }); },
})
</pre>
jQuery is a powerful tool. With it, you can fairly effortlessly cherry-pick the data you need from RSS feeds, XML, and all sorts of other data formats. It also makes doing in-preview animations a breeze.
 
 
 
 
 
 
= Twitter: Putting It All Together =
73
edits

Navigation menu