diff options
| author | Phil Crosby | 2012-06-02 20:21:23 -0700 |
|---|---|---|
| committer | Phil Crosby | 2012-06-03 16:52:32 -0700 |
| commit | 2cbb4961ce60d75c1535ad65ede5ca74db254cb3 (patch) | |
| tree | be54f31c4d1dd4841bfeb462cb0b0e6d7c51fe27 /content_scripts/vomnibar.js | |
| parent | e7f75e2c6add8048beb1f4dd2703766f016497bd (diff) | |
| download | vimium-2cbb4961ce60d75c1535ad65ede5ca74db254cb3.tar.bz2 | |
Remove "action" from Suggestion. That level of genercism isn't needed atm.
Diffstat (limited to 'content_scripts/vomnibar.js')
| -rw-r--r-- | content_scripts/vomnibar.js | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/content_scripts/vomnibar.js b/content_scripts/vomnibar.js index 3fedc8c4..b3bc00f4 100644 --- a/content_scripts/vomnibar.js +++ b/content_scripts/vomnibar.js @@ -195,14 +195,14 @@ var vomnibar = (function() { this.filterPort.onMessage.addListener(function(msg) { if (msg.id != id) return; // The result objects coming from the background page will be of the form: - // { html: "", action: "", url: "" } - // action will be either "navigateToUrl" or "switchToTab". + // { html: "", type: "", url: "" } + // type will be one of [tab, bookmark, history]. var results = msg.results.map(function(result) { - var functionToCall = completionActions[result.action]; - if (result.action == "navigateToUrl") - functionToCall = functionToCall.curry(result.url); - else if (result.action == "switchToTab") - functionToCall = functionToCall.curry(result.tabId); + var functionToCall; + if (result.type == "tab") + functionToCall = completionActions.switchToTab.curry(result.tabId); + else + functionToCall = completionActions.navigateToUrl.curry(result.url); result.performAction = functionToCall; return result; }); |
