diff options
| author | Phil Crosby | 2012-05-05 18:13:34 -0700 | 
|---|---|---|
| committer | Phil Crosby | 2012-05-05 18:32:14 -0700 | 
| commit | c2e8618fabd68fb9a920e5b6310e92fe31313e9d (patch) | |
| tree | 32ff2a7d856b910a9b6a0f3dc928825f9d180c65 | |
| parent | 67db94975790bc036bf70564ccf6e275a651e393 (diff) | |
| download | vimium-c2e8618fabd68fb9a920e5b6310e92fe31313e9d.tar.bz2 | |
Explain what the smart completor is.
| -rw-r--r-- | lib/completion.js | 12 | 
1 files changed, 9 insertions, 3 deletions
| diff --git a/lib/completion.js b/lib/completion.js index 1e70297e..543b9117 100644 --- a/lib/completion.js +++ b/lib/completion.js @@ -41,9 +41,15 @@ var completion = (function() {      this.build = buildFunction;    } -  /** A simple completer that suggests to open the input string as an URL or to trigger a web search for the -   * given term, depending on whether it thinks the input is a URL or not. */ -  var SmartCompletionSource = Class.extend({ +  /* +   * A completer which takes in a list of keyword commands (like "wiki" for "search wikipedia") and will +   * decide if your query is a command, a URL that you want to visit, or a search term. +   */ +  var SmartKeywordCompleter = Class.extend({ +    /* +     * - commands: a list of commands of the form: { keyword: [title, url] }, e.g.: +     *   { "wiki ": ["Wikipedia (en)", "http://en.wikipedia.org/wiki/%s" ] +     */      init: function(commands) {        this.commands = commands || {};        this.commandKeys = Object.keys(commands); | 
