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 /background_scripts | |
| parent | e7f75e2c6add8048beb1f4dd2703766f016497bd (diff) | |
| download | vimium-2cbb4961ce60d75c1535ad65ede5ca74db254cb3.tar.bz2 | |
Remove "action" from Suggestion. That level of genercism isn't needed atm.
Diffstat (limited to 'background_scripts')
| -rw-r--r-- | background_scripts/completion.coffee | 9 |
1 files changed, 3 insertions, 6 deletions
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: -> |
