Skip to content

Commit

Permalink
Tweak semantics of xkcd url configuration slightly.
Browse files Browse the repository at this point in the history
  • Loading branch information
chromakode committed Apr 2, 2010
1 parent 93f71df commit 7111d86
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions xkcd_cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ var xkcd = {
latest: null,
last: null,
cache: {},
proxy: "proxy.php?mode=native&url=http://xkcd.com",
base: 'proxy.php?mode=native&url=http://xkcd.com/',

get: function(num, success, error) {
if (num == null) {
path = '/info.0.json';
path = 'info.0.json';
} else if (Number(num)) {
path = '/'+num+'/info.0.json';
path = num+'/info.0.json';
} else {
error(false);
return false;
Expand All @@ -35,7 +35,7 @@ var xkcd = {
success(this.cache[num]);
} else {
return $.ajax({
url: this.proxy+path,
url: this.base+path,
dataType: 'json',
success: $.proxy(function(data) {
this.last = this.cache[num] = data;
Expand Down

0 comments on commit 7111d86

Please sign in to comment.