1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 09:08:37 +01:00

Allow empty defsearch.

This commit is contained in:
Ted Pavlic
2008-12-19 10:49:56 -05:00
committed by Kris Maglione
parent 6e9262ef64
commit 073383ef12
3 changed files with 11 additions and 1 deletions

View File

@@ -1645,7 +1645,7 @@ function Completion() //{{{
let engines = bookmarks.getSearchEngines();
context.title = ["Search Keywords"];
context.completions = keywords.concat(engines);
context.completions = [ bookmarks.makeKeyword("", "No default search engine", null, "") ].concat( keywords.concat(engines) );
context.keys = { text: 0, description: 1, icon: 2 };
if (!space || noSuggest)

View File

@@ -589,6 +589,13 @@ function Bookmarks() //{{{
return process(resp);
},
// Allows for creation of anonymous keyword (e.g., for empty
// defsearch's)
makeKeyword: function makeKeyword(keyword, title, icon, url)
{
return new Keyword( keyword, title, icon, url );
},
// TODO: add filtering
// format of returned array:
// [keyword, helptext, url]

View File

@@ -247,6 +247,9 @@ This means, it you set 'defsearch' to "youtube", then [c]:open arnold
schwarzenegger[c] will be exactly the same as [c]:open youtube arnold
schwarzenegger[c]. Therefore, you need to add a keyword or search engine
"youtube" first.
If 'defsearch' is empty, then Firefox will always attempt to open the
raw [[arg]].
____