Skip to content

Instantly share code, notes, and snippets.

@satyr
Forked from cers/directory.js
Created April 10, 2010 03:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save satyr/361807 to your computer and use it in GitHub Desktop.
Save satyr/361807 to your computer and use it in GitHub Desktop.
var gQuery;
CmdUtils.makeSearchCommand({
name: "Directory",
url: "http://www10.go.com.mt/edirnew_dev/modules/edir_checkquery.asp",
arguments: {suggest: function (txt) {
gQuery = txt;
return noun_arb_text.suggest(txt);
}},
get postData() {
if(!gQuery) return null;
var query = gQuery.split(",");
var data = {g_telephone: query[0], g_database: "MAIN"};
if (query.length > 1)
data.g_surname = query[1];
return data;
},
parser: {
container: "center font font table tr",
title: "td:nth-child(4)",
body: "td:nth-child(6)",
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment