This extensions adds a new Search Bar (View->Toolbars->Customize) which uses the built-in bookmark keywords as Search Engines. New engines can be added by the "Add a Keyword for this Search" context menu for web form to the Search Folder ("Organize > Set as Search Folder" in the Library) and can be modified like any other bookmark. Other elements like separators can also be added to the folder without harming its operations.
Additional Features:
- Keyword will be prefilled with something random if no Keyword was suggested
- Search Folder is selected for "Add a Keyword for this Search"
- Middle click on an Autocomplete result opens a new Tab (if browser.tabs.opentabfor.middleclick is true)
- Modifiers are supported for keyboard, click, and dragging: Alt/Command/Ctrl = Tab, Command+Shift/Ctrl+Shift = Background Tab, Shift = New Window
- Multiple sites can searched by using a subfolder or by creating a bookmark which has a space separated list of keywords as its keyword.
- Adds Charset and PostData fields to the Bookmark Properties Dialog.
- Includes fixes for bug 237158, 423127, and some others.
Notes:
- Editing the bookmark for the current engine requires reselection for changes to take effect.
Configurations:
Code: Select all
prefs.js: (use about:config to edit these)
// Load Results by default in new tabs
// Default -> Tab, Alt/Command/Ctrl -> Current, Shift -> Background Tab, Alt/Command/Ctrl+Shift -> New Window
user_pref("browser.search.openintab", true);
// The folder id of the Search Folder used to select the default Folder in "Add a Keyword for this Search" or or the Manage menu item
user_pref("searchtypeb.folder", "NC:BookmarksRoot");
// Use the same placeholder for all engines (changing the placeholder clears undo/redo)
user_pref("searchtypeb.overridePlaceholder", "Search");
// The Place URI used to populate the menu
user_pref("searchtypeb.place", "place:folder=BOOKMARKS_MENU&expandQueries=1");
// Use autocomplete results from the "q" parameter (used by Google and others)
user_pref("searchtypeb.param", "q");
// Use autocomplete results from the "game" parameter for the engine with the gamefaqs keyword
user_pref("searchtypeb.param.gamefaqs", "game");
// Don't persist engine change
pref("searchtypeb.persistEngine", false);
// Start group search at first tab (only for searches opening in current tab)
user_pref("searchtypeb.start_groups_at_first_tab", true);
// Remove the searchbar timeout
user_pref("searchtypeb.timeout", 0);
// Use the suggestions from the engine currently selected in the default search box
user_pref("searchtypeb.type", "search-autocomplete");
// Don't set the placeholder attribute (changing the placeholder clears undo/redo), alternatively try overridePlaceholder
pref("searchtypeb.usePlaceholder", false);
// Only allow scroll wheel switching if Alt is down while ScrollLock is on (any combinations of getModifierState values allowed)
pref("searchtypeb.wheelModifier", "ScrollLock Alt");
userChrome.css:
/* Make the enginge selector non-tabbable */
.searchbar-engine-button { -moz-user-focus:ignore; }
/* Hide the placeholder */
.searchbar-textbox ::-moz-placeholder, .searchbar-textbox :-moz-placeholder { color:transparent }
Changes:
20150912:
- Adjusted the editBookmarkOverlay overlay to use the id added by bug 481231
- Adjusted the editBookmarkOverlay overlay for the changes brought by bug 951651
- Adjusted code to not trigger the warning about unreachable code added by bug 1005110
- Adjusted code to not trigger the deprecation warning added by bug 1100294
- Adjusted the getShortcutOrURIAndPostData patch to not unnecessarily unescape postData
- Replaced the keywordField with a menulist to edit keywords undiscoverable since bug 1125113 [Fx39+]
- Added a frame script to replace ContextMenu:SearchFieldBookmarkData [Fx41+]
- Added a patch for PlacesDBUtils.jsm to correctly calculate foreign_count
- Added code to recalculate foreign_count once per session
- Added left padding back to the search engine image
- Added minimal styling for builds with bug 1119250
- Added a patch to GetSearchFieldBookmarkData to work around a typo in ESR (charSet/charset)
- Added multiprocessCompatible
- Removed some obsolete code, including the patch for bug 767939
Full Changelog.