Skip to content

Instantly share code, notes, and snippets.

Created April 28, 2009 01:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/102868 to your computer and use it in GitHub Desktop.
Save anonymous/102868 to your computer and use it in GitHub Desktop.
CmdUtils.CreateCommand({
name: "walkscore",
homepage: "http://heltons.mooo.com/ubiq/",
author: {name: "Aaron Helton", email: "mariusagricola@gmail.com"},
license: "GPL",
description: "For any address you can map in Google Maps, you can
also get your walk score",
help: "Finds the Walk Score for any address you can find in Google
Maps. Try using a full address for the narrowest and most accurate
result.",
takes: {"input": /.*/},
preview: function(pblock, input) {
pblock.innerHTML = "Get the Walk Score for <b>" + input.text +
"</b>.";
},
execute: function(input) {
//displayMessage("Get the Walk Score for: " + input.text);
var wsloc = input.text;
var wsurl = "http://www.walkscore.com/get-score.php?street=" +
escape(wsloc) + "&go=Go";
Utils.openUrlInBrowser( wsurl );
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment