Skip to content

Instantly share code, notes, and snippets.

/walkscore.js
Created Apr 28, 2009

Embed
What would you like to do?
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
You can’t perform that action at this time.