Skip to content

Instantly share code, notes, and snippets.

@lamberta
Last active July 17, 2021 14:11
Show Gist options
  • Save lamberta/5996854 to your computer and use it in GitHub Desktop.
Save lamberta/5996854 to your computer and use it in GitHub Desktop.
Firefox search plugin using DuckDuckGo and auto-complete from Startpage.
<!-- DuckDuckGo HTTPS search using Startpage suggestions.
- Url params: https://duckduckgo.com/params
- OSX location: Firefox.app/Contents/MacOS/browser/searchplugins
- In about:config, browser.search.defaultenginename = DuckDuckGo -->
<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/">
<ShortName>DuckDuckGo</ShortName>
<Description>DuckDuckGo Search</Description>
<InputEncoding>UTF-8</InputEncoding>
<Image width="16" height="16">https://duckduckgo.com/favicon.ico</Image>
<Url type="application/x-suggestions+json" method="POST" template="https://startpage.com/do/suggest">
<Param name="lang" value="english"/>
<Param name="output" value="json"/>
<Param name="query" value="{searchTerms}"/>
</Url>
<Url type="text/html" method="POST" template="https://duckduckgo.com/">
<Param name="kg" value="p"/>
<Param name="kw" value="w"/>
<Param name="ko" value="s"/>
<Param name="ke" value="-1"/>
<Param name="k1" value="-1"/>
<Param name="km" value="l"/>
<Param name="k4" value="-1"/>
<Param name="q" value="{searchTerms}"/>
</Url>
<SearchForm>https://duckduckgo.com/</SearchForm>
</SearchPlugin>
@lamberta
Copy link
Author

Revision 1 used Wikipedia for auto-suggest terms; changed to Startpage in revision 2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment