summaryrefslogtreecommitdiff
path: root/common/content/bookmarks.js
diff options
context:
space:
mode:
authorKris Maglione <maglione.k@gmail.com>2011-02-05 18:29:58 -0500
committerKris Maglione <maglione.k@gmail.com>2011-02-05 18:29:58 -0500
commit221ddd46b0eddba1921f8254c71218d3a8b3c5fe (patch)
tree94b91182f25ab9d6b033eef245dfb3dd96557d91 /common/content/bookmarks.js
parent4d47bfe0028c69778db80a1e63eac6f4124ce380 (diff)
downloadpentadactyl-221ddd46b0eddba1921f8254c71218d3a8b3c5fe.tar.gz
Fix some option validators. Add tests.
Diffstat (limited to 'common/content/bookmarks.js')
-rw-r--r--common/content/bookmarks.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/common/content/bookmarks.js b/common/content/bookmarks.js
index 52c1ecee..d49016c5 100644
--- a/common/content/bookmarks.js
+++ b/common/content/bookmarks.js
@@ -633,12 +633,12 @@ var Bookmarks = Module("bookmarks", {
};
completion.searchEngine = function searchEngine(context, suggest) {
- let engines = services.browserSearch.getEngines({});
+ context.title = ["Suggest Engine", "Description"];
+ context.keys = { text: "keyword", description: "title", icon: "icon" };
+ context.completions = values(bookmarks.searchEngines);
if (suggest)
- engines = engines.filter(function (e) e.supportsResponseType("application/x-suggestions+json"));
+ context.filters.push(function ({ item }) item.supportsResponseType("application/x-suggestions+json"));
- context.title = ["Suggest Engine", "Description"];
- context.completions = engines.map(function (e) [e.alias, e.description]);
};
completion.searchEngineSuggest = function searchEngineSuggest(context, engineAliases, kludge) {