Changes

Jump to: navigation, search

Learning Collaborative Development Lab Fall 2008 Results

847 bytes added, 00:29, 11 September 2008
no edit summary
});
</pre>
<br>
------
<br> SO I reused Ezadkiel Marbella's code and made code for searching cnet.com. this thing is so much fun I am thinking about making something else too.
<br>
<pre>
CmdUtils.CreateCommand({
name: "cnet:",
author: { name: "Zaid Ghansar" },
description: "Searches cnet.com.",
help: "searches for a highlighted term or typed term at cnet.com",
takes: {"search terms": noun_arb_text},
preview: function( pblock, searchquery ) {
pblock.innerHTML = "<img src='http://i.afterdawn.com/v3/news/cnet_logo.gif' /> Will Search For: " + searchquery.text;
},
execute: function( cnetquery ) {
var url = "http://www.cnet.com/1770-5_1-0.html?query={QUERY}&tag=srch"
var query = cnetquery.text;
query = query.replace("+", " ");
var urlString = url.replace("{QUERY}", query);
Utils.openUrlInBrowser(urlString);
}
})
</pre>
<br>
----
1
edit

Navigation menu