Skip to content

Instantly share code, notes, and snippets.

@matthewfl
Created January 2, 2009 20:30
Show Gist options
  • Save matthewfl/42675 to your computer and use it in GitHub Desktop.
Save matthewfl/42675 to your computer and use it in GitHub Desktop.
Get the IP with Ubiquity
// Ubiquity code from http://ubiquity.appjet.net/
// BY: ip-get
// Title: ip-get
/* Description: Get your Ip address */
CmdUtils.CreateCommand({
name: "ip-get",
preview: function( pblock ) {
jQuery.get("http://json-through.appjet.net/ip", function (ip) {
pblock.innerHTML = "Your ip is "+ip;
});
},
execute: function() {
jQuery.get("http://json-through.appjet.net/ip", function (ip) {
CmdUtils.setSelection( ip );
});
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment