Revisions

gist: 153787 Download_button fork
public
Public Clone URL: git://gist.github.com/153787.git
Embed All Files: show embed
JavaScript #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// First form
var noun_url = {
  label: "url",
  noExternalCalls: true,
 
  suggest: function(text, html, callback, selectedIndices) {
    find(text, function(results){
        callback([CmdUtils.makeSugg(r.uri, r.title, r.favicon, 0.8) for each (r in results)]);
    })
    return [CmdUtils.makeSugg(text, html, null, 0.5, a)];
  }
};
 
// Second form
var noun_url = {
  label: "url",
  noExternalCalls: true,
 
  suggest: function(text, html, callback, selectedIndices) {
    find(text, function(results){
        callback([CmdUtils.makeSugg(r.uri, r.title, r.favicon, 0.8) for each (r in results)]);
    })
    return [CmdUtils.makeSugg(text, html, null, 0.5)];
  }
};