Recently I decided to use duckduckgo instead of google, and I installed it as a search engine.
The problem is that Firefox uses https://duckduckgo.com/opensearch.xml to know the search url. But I want to customize it using parameters.
Then, I tried going to Firefox's profile folder and modifying search.json
and searchplugins/duckduckgo.xml
with my own parameters.
It worked at first, but I have Firefox Nightly (updated each day), and after each update I lose my list of search engines.
To recover it, I do:
- Delete
search.json
andsearchplugins/duckduckgo.xml
- Restart firefox
- Add duckduckgo again
- Modify
search.json
andsearchplugins/duckduckgo.xml
again
But I don't want to do that everyday. Which is the correct way of customizing search engines?
Note 1: The difference between an old search.json
and a new one is minimal:
1.
{"version":7,"buildID":"2013110
903020
6","locale":"en-US","directories":{"Path\\To\\Nightly\\browser\\searchplugins":{"lastModifiedTime":1384
018305984,"engines":
{"version":7,"buildID":"201311
1003020
5","locale":"en-US","directories":{"Path\\To\\Nightly\\browser\\searchplugins":{"lastModifiedTime":1384
100021250,"engines":
2.
"Path\\To\\Profile\\searchplugins":{"lastModifiedTime":1384
040082109,"engines":[{"_id":"[profile]/duckduckgo.xml"
"Path\\To\\Profile\\searchplugins":{"lastModifiedTime":1384
100281656,"engines":[{"_id":"[profile]/duckduckgo.xml"
3.
"_urls":[{"template":"https://duckduckgo.com/?q={searchTerms}
&myCustomParameter=myCustomValue"
"_urls":[{"template":"https://duckduckgo.com/?q={searchTerms}"
Note 2:
I know I can use URL keywords and modify keyword.URL
, but I want to be able to search with my customized search engine using the search bar too.
Then, my question is not a duplicate of How to add a custom search engine to Firefox?.
Solution
It seems the problem was that adding DuckDuckGo using Firefox.
Firefox created the following DuckDuckGo.xml
:
<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/" xmlns:os="http://a9.com/-/spec/opensearch/1.1/">
<os:ShortName>DuckDuckGo</os:ShortName>
<os:Description>Search DuckDuckGo (SSL)</os:Description>
<os:InputEncoding>UTF-8</os:InputEncoding>
<os:Image width="16" height="16">data:image/x-icon;base64,...</os:Image>
<os:Url type="text/html" method="GET" template="https://duckduckgo.com/?q={searchTerms}">
</os:Url>
</SearchPlugin>
But it should be
<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/">
<ShortName>DuckDuckGo</ShortName>
<Description>DuckDuckGo. More Privacy. Less Spam.</Description>
<InputEncoding>UTF-8</InputEncoding>
<Image height="16" width="16" type="image/x-icon">data:image/x-icon;base64,...</Image>
<Url type="text/html" method="GET" template="https://duckduckgo.com/">
<Param name="q" value="{searchTerms}"/>
</Url>
<SearchForm>https://duckduckgo.com/</SearchForm>
</SearchPlugin>
Not sure if I changed things in search.json
too.