Open main menu

CDOT Wiki β

Changes

Learning Collaborative Development Lab Fall 2008 Results

830 bytes added, 20:55, 11 September 2008
no edit summary
Unlike the previous command, it will not freeze the browser while the timed command is being performed.<br />
---
 
----
[[User:jsdoodna|Joshua Doodnauth]]
<br />
Simple Google Image Search, working on retrieving some images to for preview
 
CmdUtils.CreateCommand({
name: "image-search",
author: {name:"Joshua Doodnauth", email:"jsdoodnauth@gmail.com"},
licence: "GPL",
description: "Searches for images on Google",
takes: {"image-search": noun_arb_text},
preview: function(pblock, imSearch) {
pblock.innerHTML = "Google Image Search: " + imSearch.text +" <br /><img src='http://www.google.ca/intl/en_ALL/images/images_hp.gif' width='150' />";
},
execute: function(imSearch) {
var URL = "http://images.google.ca/images?gbv=2&hl=en&safe=on&q={QUERY}&btnG=Search+Images";
var query = imSearch.text;
var searchStr = URL.replace("{QUERY}",query);
Utils.openUrlInBrowser(searchStr);
}
})
 
----
1
edit