From 2cbb4961ce60d75c1535ad65ede5ca74db254cb3 Mon Sep 17 00:00:00 2001 From: Phil Crosby Date: Sat, 2 Jun 2012 20:21:23 -0700 Subject: Remove "action" from Suggestion. That level of genercism isn't needed atm. --- content_scripts/vomnibar.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'content_scripts') 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; }); -- cgit v1.2.3