Skip to content

Instantly share code, notes, and snippets.

@choffee
Created February 16, 2009 16:21
Show Gist options
  • Save choffee/65234 to your computer and use it in GitHub Desktop.
Save choffee/65234 to your computer and use it in GitHub Desktop.
Search York directory
//Note: This command was automatically generated by the create-new-search-command command.
CmdUtils.CreateCommand({
name: "yorkbyusername",
url: "https://www.york.ac.uk/directory/user/searchaction.cfm",
icon: "http://www.york.ac.uk/favicon.ico",
description: "Searches www.york.ac.uk for a username",
takes: {"search term": noun_arb_text},
execute: function(input){ var query = encodeURIComponent(input.text);
var postData = "surname=&department=&username={QUERY}&telephone=&scope=staff&scope=students".replace(/%s|{QUERY}/g, query);
Utils.openUrlInBrowser("https://www.york.ac.uk/directory/user/searchaction.cfm", postData);}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment