Anonymous (owner)

Revisions

  • 56c85f Mon Apr 27 18:26:59 -0700 2009
gist: 102868 Download_button fork
public
Public Clone URL: git://gist.github.com/102868.git
Embed All Files: show embed
walkscore.js #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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 );
  }
});