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. --- background_scripts/completion.coffee | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'background_scripts') diff --git a/background_scripts/completion.coffee b/background_scripts/completion.coffee index 15725b62..5cc36227 100644 --- a/background_scripts/completion.coffee +++ b/background_scripts/completion.coffee @@ -1,8 +1,6 @@ class Suggestion # - type: one of [bookmark, history, tab]. - # - action: one of [navigateToUrl, switchToTab]. - # TODO(philc): remove action. I don't think we need it here. - constructor: (@queryTerms, @type, @url, @title, @action) -> + constructor: (@queryTerms, @type, @url, @title) -> generateHtml: -> @html ||= @@ -51,7 +49,7 @@ class BookmarkCompleter results = @bookmarks.filter (bookmark) => RankingUtils.matches(@currentSearch.queryTerms, bookmark.url, bookmark.title) suggestions = results.map (bookmark) => - new Suggestion(@currentSearch.queryTerms, "bookmark", bookmark.url, bookmark.title, "navigateToUrl") + new Suggestion(@currentSearch.queryTerms, "bookmark", bookmark.url, bookmark.title) onComplete = @currentSearch.onComplete @currentSearch = null onComplete(suggestions) @@ -79,8 +77,7 @@ class HistoryCompleter results = [] HistoryCache.use (history) -> results = history.filter (entry) -> RankingUtils.matches(queryTerms, entry.url, entry.title) - suggestions = results.map (entry) => - new Suggestion(queryTerms, "history", entry.url, entry.title, "navigateToUrl") + suggestions = results.map (entry) => new Suggestion(queryTerms, "history", entry.url, entry.title) onComplete(suggestions) refresh: -> -- cgit v1.2.3