A omnibox
extension which implements !g
style search redirections implemented in
DuckDuckGo but locally.
- QuickSearch in action
- How does it work
- Installation
- Usage
- Configuration
- Development on the extension
- Alternatives
- Contributing
A small demonstration with the default aliases.
This extension leverages the omnibox
APIs to get invoked upon a trigger word being searched. For this extension, the
trigger phrase is !f
. Any tokens after this word will be sent to the
extension. The extension will then try to find any resolvers using the first
token and if found, the remaining tokens will replace the $TERM$
keyword in
the template URL. If no resolvers are found, the omnibox is just cleared.
The extension is available in the Mozilla Add-Ons store at QuickSearch
Type !f rs tokio
and it should open the documentation for the
tokio crate on docs.rs. By default there
are a few aliases. See the Configuration section.
You can now use a resolver with no search strings, which would become a bookmarking tool. For example,
{
"kc": "https://c.xkcd.com/random/comic"
}
In order to use it, !f kc
.
The extension now supports navigating to the settings using a simple !f @config
.
Because the extension is using
@
for identifying reserved functions within the extension, it can no longer be used for user-defined resolvers. If they are defined, they won't be accessible.
Type !f @config
in omnibox, voila!
In the Mappings section, you can add your own aliases
and then click on save.
As an example, if you wanted to add a Wikipedia resolver, you could add
"w": "https://en.wikipedia.org/wiki/$TERM$"
And press save. After that !f w foobar
should be able to search foobar
on
Wikipedia.
Note: This is useful only for services that have a way to represent searches in HTTP GET.
To build your own extension
- Clone the repository using
git clone https://github.com/prateeknischal/quicksearch
- On your Firefox browser, type
about:debugging
in the search bar - Click on
This Firefox
and thenLoad Temporary Add-on
- Once the file explorer opens, navigate to location where the project was
cloned and select the
manifest.json
file and click on open.
And that's it, the plugin should be ready to go!
To build the bundle, Mozilla recommends mozilla/web-ext to build and sign.
This idea has a lot in common with "Adding your custom search engine in Firefox" which already exists for simple searches and only searches.
This project is an attempt to make the omnnibox do a little more!
- Ability to find resolvers from the smallest unique prefix. For example,
!f w <term>
should invoke thewiki
resolver if there are no other resolvers starting withw
. Basically a trie based search - Add
!f @config
to open the settings page directly - Potentially be useful for any URL manipulation
- Intelligent resolvers. For example, If I want to look for the docs for
io.Writer
and I invoke thego
resolver, it should be intelligent enough to understand this as a stdlib struct and understand the intent of!f go io.Writer
and open the right page. To emulate the behaviour today, you will need to register
"gd": "https://pkg.go.dev/$TERM$"
And search for !f gd io#Writer
.