Firefox add-on to expand keywords in bookmark URLs.
JavaScript Ruby
Latest commit f703c78 Mar 24, 2016 @blackwinter v0.6.0

Keyword Expansion

Firefox add-on to expand keywords in bookmark URLs. Modern alternative to KeywordSelection.


Embed directives of the form %{ke:<keyword>[:<options>]} in your bookmark URLs.


Possible keywords are:

Keyword Replacement
selection The currently selected text (if no text is selected, the fallback option applies)
location The current tab's location URL
origin The current tab's origin
domain The current tab's domain
host The current tab's host
path The current tab's path
query The current tab's query
directory The current tab's path without the last component


Options are of the form <option>[=<value>], where <value> defaults to true. Multiple options are separated by ,.

Option Description
escape Whether the replacement value should be encoded as a URI component (default, specify escape=false if you need the unescaped value)
fallback Which page to load if no text is selected (only applies to the selection keyword); possible values are: origin (the site's homepage, default), path (the URL without the query parameters), directory (the path without the last component), basedir (the path's first component only)

Keyword searches compatibility

The following directives are supported for compatibility with keyword searches. Options are not allowed.

Directive Equivalent
%s %{ke:selection}
%S %{ke:selection:escape=false}

You can disable keyword searches compatibility in the extension preferences.


Bookmark Selection/Location Result{ke:selection} keyword selection{ke:selection:escape=false} keyword selection selection{ke:selection}{ke:selection:fallback=path} keyword selection keyword selection selection{ke:location}{ke:origin}


Open keyword-expansion.xpi (HTTPS) or keyword-expansion.xpi (HTTP) in Firefox.

Automatic updates only work with the HTTPS link.


This project adheres to the Semantic Versioning Specification.



License and Copyright

Copyright (C) 2015-2016 Jens Wille

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at