Changes

Jump to: navigation, search

Learning Collaborative Development Lab Fall 2008 Results

880 bytes added, 13:05, 9 September 2008
added xkcd search
})
----
Searches the XKCD archives for whatever term you enter. Not complex, but can be enjoyable.
CmdUtils.CreateCommand({
name: "xkcd",
homepage: "http://belligero.org",
author: {name: "Jason", email: "slokun@belligero.org"},
license: "MPL",
description: "Search XKCD",
takes: {"phrase": noun_arb_text},
_getSearchUrl: function(term) {
return "http://www.ohnorobot.com/?comic=56&s="+term;
},
/* Preview */
preview: function(pblock, theSearch) {
var msg = "<img src='http://imgs.xkcd.com/static/xkcdLogo.png'>"+
"<br />Search the XKCD archives for <i>"+theSearch.text+"</i>";
pblock.innerHTML = msg;
},
execute: function(theSearch) {
var msg = "Search completed for "+theSearch.text+"...";
Utils.openUrlInBrowser(this._getSearchUrl(theSearch.text));
displayMessage(msg);
}
})
--[[User:Jtarka|Jtarka]] 17:05, 9 September 2008 (UTC)
1
edit

Navigation menu