Created
April 28, 2009 01:26
-
-
Save anonymous/102868 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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