Difference between revisions of "Learning Collaborative Development Lab Fall 2008 Results"
m |
m |
||
Line 47: | Line 47: | ||
CmdUtils.CreateCommand({ | CmdUtils.CreateCommand({ | ||
name: "irc", | name: "irc", | ||
+ | author: {name: "Patrick Lam"}, | ||
icon: "https://addons.mozilla.org/en-US/firefox/images/addon_icon/16", | icon: "https://addons.mozilla.org/en-US/firefox/images/addon_icon/16", | ||
preview: "Starts ChatZilla 0.9.83 and connects to irc://moznet/", | preview: "Starts ChatZilla 0.9.83 and connects to irc://moznet/", | ||
Line 57: | Line 58: | ||
CmdUtils.CreateCommand({ | CmdUtils.CreateCommand({ | ||
name: "blog", | name: "blog", | ||
+ | author: {name: "Patrick Lam"}, | ||
takes: {"user": noun_arb_text}, | takes: {"user": noun_arb_text}, | ||
icon: "http://pplam3.blogspot.com/favicon.ico", | icon: "http://pplam3.blogspot.com/favicon.ico", | ||
Line 72: | Line 74: | ||
CmdUtils.CreateCommand({ | CmdUtils.CreateCommand({ | ||
name: "osd", | name: "osd", | ||
+ | author: {name: "Patrick Lam"}, | ||
takes: {"blog": noun_arb_text}, | takes: {"blog": noun_arb_text}, | ||
preview: "Goes to OSD600 Weekly Schedule. By typing 'blog' after, it goes to the Planet's Blog", | preview: "Goes to OSD600 Weekly Schedule. By typing 'blog' after, it goes to the Planet's Blog", |
Revision as of 12:04, 9 September 2008
Place any and all common results, code, notes here.
Zenit-Wiki Search by Ezadkiel Marbella:
CmdUtils.CreateCommand({ name: "zenit/wiki specific search:", takes: {"search zenit/wiki term": noun_arb_text}, preview: function( pblock, wikiquery ) { pblock.innerHTML = "Will Search For: " + wikiquery.text; }, execute: function( wikiquery ) { var url = "http://zenit.senecac.on.ca/wiki/index.php/Special:Search?search={QUERY}&go=Go" var query = wikiquery.text; var urlString = url.replace("{QUERY}", query); Utils.openUrlInBrowser(urlString); } })
This is my submission. I am assuming we are encouraged to reuse code wherever possible. When using the search it is recommended that you separate the terms by + signs as that is what the goggle interface inserts between search terms. I found that it works when spaces are used as well though.
--John64 16:24, 9 September 2008 (UTC)
/*This function is based off Ezadkiel Marbella's code http://zenit.senecac.on.ca/wiki/index.php/Learning_Collaborative_Development_Lab_Fall_2008_Results */ CmdUtils.CreateCommand({ name: "zenit-google-search:", takes: {"search terms seperated by a '+' sign": noun_arb_text}, preview: function( pblock, googlequery ) { pblock.innerHTML = "Will Search For: " + googlequery.text; }, execute: function( googlequery ) { var urlPrefix = "http://www.google.ca/search?hl=en&q=site%3Azenit.senecac.on.ca%2Fwiki+" var urlSuffix = "&btnG=Search&meta=" var query = googlequery.text; var urlString = urlPrefix + query + urlSuffix; Utils.openUrlInBrowser(urlString); } })
This command opens up the ChatZilla extension and connect to moznet
CmdUtils.CreateCommand({ name: "irc", author: {name: "Patrick Lam"}, icon: "https://addons.mozilla.org/en-US/firefox/images/addon_icon/16", preview: "Starts ChatZilla 0.9.83 and connects to irc://moznet/", execute: function() { Utils.openUrlInBrowser( "irc://moznet/" ); } })
This command goes to any users blog at Blogspot
CmdUtils.CreateCommand({ name: "blog", author: {name: "Patrick Lam"}, takes: {"user": noun_arb_text}, icon: "http://pplam3.blogspot.com/favicon.ico", preview: "Goes to Blogspot by default or to the specified user's blog", execute: function( directObj ) { var preText = "www"; if (directObj.text != "") { preText = directObj.text; } Utils.openUrlInBrowser( "http://" + preText + ".blogspot.com" ); } })
This command goes to either Weekly Schedule or the Planet blog
CmdUtils.CreateCommand({ name: "osd", author: {name: "Patrick Lam"}, takes: {"blog": noun_arb_text}, preview: "Goes to OSD600 Weekly Schedule. By typing 'blog' after, it goes to the Planet's Blog", execute: function( directObj ) { if( directObj.text == "") { Utils.openUrlInBrowser( "http://zenit.senecac.on.ca/wiki/index.php/DPS909_and_OSD600_Fall_2008_Weekly_Schedule" ); } else { Utils.openUrlInBrowser( "http://zenit.senecac.on.ca/~chris.tyler/planet/" ); } } })