Created
July 27, 2009 14:31
-
-
Save jyt/156401 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//This is a ubiquity command | |
//It will let yoou search about any university in india | |
CmdUtils.CreateCommand({ | |
names: ["search university for"], | |
description: "This command will open links to the pages about universities for a particular course at location in India specified by u ", | |
help: "To view the list of universities type the course and the location you preferred", | |
author: {name: "Jyoti", email: "mail2jyoti88@gmail.com"}, | |
homepage: "http://jyzyy.blogspot.com/", | |
arguments: [{role: 'object', nountype: noun_arb_text, label:'course name'}, | |
{role: 'location', nountype: noun_type_geolocation, label:'location'} | |
], | |
preview: function preview(pblock, args) { | |
pblock.innerHTML = "Show the universities for <b>" + args.object.html + "</b> in <b>"+args.location.html+"</b>."; | |
}, | |
execute: function(args) | |
{ | |
if(args.object.text=="") | |
{ | |
displayMessage("You havent specified the course name"); | |
return; | |
} | |
else if(args.location.text=="") | |
{ | |
displayMessage("You havent specified the location"); | |
return; | |
} | |
else | |
{ | |
Utils.openUrlInBrowser("http://www.shiksha.com/search/index?keyword="+args.object.text+"&location=" | |
+args.location.text); | |
}} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment