Skip to content

Commit

Permalink
convert xkcd
Browse files Browse the repository at this point in the history
  • Loading branch information
hunterlang committed Apr 21, 2012
1 parent 6bd9760 commit 05f94db
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
5 changes: 3 additions & 2 deletions lib/DDG/Spice/Xkcd.pm
Expand Up @@ -3,13 +3,14 @@ package DDG::Spice::Xkcd;
use DDG::Spice;

triggers startend => "xkcd";
spice to => '/api-0/jsonp/comic/$1?callback={{callback}}';

handle query_lc => sub {
if ($_ eq 'xkcd' || $_ =~ /^xkcd (\d+)$/) {
if ($1) {
$return = qq(/ixk/$1);
return $1;
} else {
$return = qq(/ixk);
return '';
}
}
};
Expand Down
5 changes: 0 additions & 5 deletions share/spice/xkcd/nginx.conf

This file was deleted.

2 changes: 1 addition & 1 deletion share/spice/xkcd/spice.js
@@ -1,7 +1,7 @@
/*
nr is the prefix for this function space.
*/
function nrxk(xk) {
function ddg_spice_xkcd(xk) {
// console.log(xk);

var img,snippet,link,div;
Expand Down

0 comments on commit 05f94db

Please sign in to comment.