Context Search X

By: lwz


Add-on Homepage

About this add-on

Note: I have no intention to receive any donations, but you could at least give me some feedback/appreciation! =). I can be contacted at Middle-click the link instead of left-clicking it.

This was based on Ben Basson's Context Search add-on at However, from version, the code was largely rewritten to suit my additional modifications.

Tip: To create custom search engines, you can use the Add to Search Bar add-on or use the forms at or

Identical functions:

  1. The list of search engines is displayed in the context menu for searching selected text.
  2. By default, most of the engines will be displayed in the submenu 'Search for "..."'.
  3. Separators can be used to group engines.


  1. Configuration GUI overlaid onto the "Manage Search Engines..." dialog to modify preferences (
  2. Specified items outside submenu (0.4.6+) or hidden (
    (default: Google, Wikipedia and The Free Dictionary are placed outside submenu)
  3. Ability to change action of different mouse buttons and keyboard access-key activation (
    (default: current tab - right-click, new tab with foreground/background toggled (tab shift) - middle-click)
  4. Site Search (additional item in submenu): Searches for selected text in current site using Google ( or a specified engine (
    (default: Google)
  5. Menu item itself acts like the default context-menu item (default), or submits to a user-specified engine (
  6. Ability to edit labels of items outside submenu (0.4.6+) and items in submenu (
  7. Shortcut to configuration GUI from the submenu (
  8. Context menu can be pinned (i.e. kept open) for searches in background tabs, so that multiple searches can be executed at once, and can be toggled temporarily by pressing the space-bar in the context menu ( -- thanks to feedback from KJH23SJH99
  9. Maximum selection length for submission to search engine can be modified (
  10. Holding the mouse button down until outline of menu item blinks will toggle enclosing selection in quotes (
  11. Hidden preference (about:config necessary) extensions.contextsearchx.showIcons allow icons to be shown in the top level context menu ( -- thanks to feedback from Точки над Ё
  12. "Search for ..." menu item will now have the icon of the default engine ( -- thanks to feedback from Renato Silva and Eduard Braun
  13. If there is no selection, the word under the cursor will be used instead ( -- thanks to feedback from Renato Silva
  14. If all the engines in the submenu are hidden, the "Manage Search Engines..." will be placed outside the submenu and the submenu will be hidden ( -- thanks to feedback from Solotak
  15. The hidden preference showIcons is now in the GUI (
  16. The new preferences of disableSubmenu, enableDefaultEngine, separatorBefore and separatorAfter allow minor tweaks of the context search menu (
  17. One can now enable clipboard use by turning on useClipboard, and holding shift while bringing up the context menu -- it is intentionally made unlikely to be accidentally triggered because of possible privacy issues (
  18. Holding Ctrl/Command/Win when triggering a search toggles background/foreground opening of new tabs (0.4.6+), and also changes the mode to opening searches in new tabs (
  19. Alternate text or tooltip (alt/title attribute) is used when there is no selection or word under cursor, e.g. images (


  1. English
  2. Deutsch -- by Boris Cornet (
  3. Русский -- by Точки над Ё (
  4. Português do Brasil -- by Renato Silva (
  5. Nederlands -- by Antonius32 (
  6. 中文 -- by Long Yu (
  7. Français -- by DenB (


Hidden Preferences "extensions.contextsearchx.*":
(all modifiable with GUI in version

  1. menuItems: (0.4.6+, new format in version, but converts from previous version) [|]enginename:[>]label:accesskey separated by comma. A sample menuItems preference is made default (Google, Wikipedia, The Free Dictionary would be brought outside the menu, and a separator is made before Google:$S:G,Wikipedia (en):Wikipedia:w,The Free Dictionary:$S:d,|
  2. [|]enginename: Engine name with optional "|" in front to add a separator before item.
  3. [>]label: The label to be used, with ">" in front to leave it in submenu. "$S" is replaced by the engine name. To hide the engine, enter a single ">". Leave it blank (same as ">$S") to keep it in submenu (default).
  4. accesskey: The key to press on the keyboard to trigger the command when the menu/submenu is open.
  5. hideStandardContextItem, quoteStringsWithSpaces (0.4.6+)
  6. defaultEngine, siteSearchEngine, currentTabButton, tabShiftButton, beforeSubmenu (
  7. showIcons (
  8. disableSubmenu, enableDefaultEngine, separatorBefore, separatorAfter (
  9. Hidden: useAllSources - turns off feature 13 and 19 (

Solved Bugs/Short-falls:

  1. Incompatibility with original add-on (0.4.6)
  2. Separators outside sub-menu kept increasing in number ( and earlier)
  3. Failed to close menu after clicking on the sub-menu item using the default engine. (
  4. Site Search could not be modified like a search engine from GUI (
  5. Selection extraction from input controls did not trim whitespace characters (
  6. Fixed bug with further overlays to the engine manager dialog -- thanks to feedback from Coldumbo (
  7. Preference window size did not automatically increase to accommodate new buttons as its size persisted from previous engine manager sessions ( -- thanks to feedback from Semisonic
  8. Unicode search engine labels in the context menu was not supported ( and earlier) -- thanks to feedback from Точки над Ё
  9. Site Search item was not localised with the chosen locale ( and earlier) -- thanks to feedback from Точки над Ё
  10. The "Manage Engines..." menu item did not work with the search bar manually removed from the toolbar ( and earlier) -- thanks to feedback from cmlx
  11. If pin-popup is turned on, and you enclosed the search with quotes on-the-fly, it will not get reset ( and earlier)
  12. If an extension made by Scriptify is installed and enabled, triggering a search tab in the background might open two tabs ( -- thanks to feedback from Jeff Moriva

    • One of them will be locked and exiting Pale Moon is the only way to close it (in fact, opening two tabs very quickly in any way causes this locking problem with Scriptify)
    • This bug-fix might also solve other problems involving two tabs opening for every search (but not the one due to the pin-popup feature)

  13. If pin-popup is turned on, left/right-clicking an engine, if set to open tabs in background, might open two searches ( -- thanks to feedback from Ken Schuster

    • This bug-fix should finally solve all problems associated with two search results opening

  14. If hideStandardContextItem was switched off, the item always appeared even when there is no selected text. (0.4.6-
  15. Incompatibility with multi-process Firefox (e10s) (0.4.6-
  16. Incompatibility with Pale Moon (0.4.6-
  17. Toggling quoting of strings (feature 10) did not force quotes for strings without spaces (
  18. Strings without spaces were quoted with quoteStringsWithSpaces turned on (
  19. The alt/title value was used in preference over the current word (
  20. Right clicking on text from password fields displayed whatever password was selected (0.4.6-
  21. The default search context menu item was sometimes not hidden when useAllSources was turned off (
  22. Searching from password fields was still enabled, though asterisks were searched instead (


Mozilla Public License 1.1


Released: September 22, 2018