Changes

Jump to: navigation, search

Learning Collaborative Development Lab Fall 2008 Results

13 bytes removed, 00:02, 12 September 2008
no edit summary
CmdUtils.CreateCommand({
 
// Name of the Command
name: "cuil",
 
// Homepage
homepage: "http://zenit.senecac.on.ca/wiki/index.php/User:Cdpatel1",
 
// Author
author: { name: "Chinmay Patel", email: "cdpatel1@learn.senecac.on.ca"},
 
// Contributors
contributors: ["Chinmay Patel"],
 
// License
license: "Open For ALL ... any time ... any where ... in all conditions",
// Input from selection
takes: {"search zenit/wiki term": noun_arb_text},
/* Preview of the Command */
preview: function( previewBlock, searchQuery ) {
 
// HTML part for the preview block
previewBlock.innerHTML = "Search for" + searchQuery.text;
 
},
/* Execute Function*/
execute: function( searchQuery ) {
 
// Searching URL from cuil website. I just copied this URL from a search in CUIL
var url = "http://www.cuil.com/search?q={QUERY}"
 
// Putting our serching term in a variable
var query = searchQuery.text;
 
// replacing {QUERY} with the search terms
var urlString = url.replace("{QUERY}", query);
 
// When press enter, open new window with URL of urlString.
Utils.openUrlInBrowser(urlString);
1
edit

Navigation menu