[SOLVED] How can I add a custom search plugin to Fx57?

Discussion about official Mozilla Firefox builds
Post Reply
User avatar
earlpiggot
Posts: 726
Joined: May 30th, 2004, 2:40 pm
Location: Greece

[SOLVED] How can I add a custom search plugin to Fx57?

Post by earlpiggot »

Is there any documentation on search plugins in Fx57 Nighlies?

I tried adding a new xml file in the searchplugins folder under my profile with the following structure:

Code: Select all

<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/" xmlns:os="http://a9.com/-/spec/opensearch/1.1/">
<os:ShortName>SOME SHORT NAME</os:ShortName>
<os:Description>SOME DESCRIPTION</os:Description>
<os:InputEncoding>UTF-8</os:InputEncoding>
<os:Image width="16" height="16">data:image/png;base64,...</os:Image>
<SearchForm>SOME URL</SearchForm>
<os:Url type="text/html" method="GET" template="SEARCH URL">
  <os:Param name="URL PARAMETER NAME" value="{searchTerms}"/>
  <os:Param name="sourceid" value="Mozilla-search"/>
</os:Url>
</SearchPlugin>
No luck. The whole searchplugins folder is ignored. There is a new mechanism for search plugins, but what is it? Maybe it's been there for a while, but I've missed it.
Last edited by earlpiggot on September 1st, 2017, 9:38 am, edited 1 time in total.
User avatar
earlpiggot
Posts: 726
Joined: May 30th, 2004, 2:40 pm
Location: Greece

Re: How can I add a custom search plugin to Fx57 Nightly?

Post by earlpiggot »

So, here we are…
Firefox 45 changed how the search engines installed by the user are stored in disk: instead of plain XML files, now a unique compressed and hashed file is used. It was in order to provide a better protection against search hijacking, but it made impossible to edit or even inspect the data of these engines to knowledgeable users without the use of additional ad hoc tools; even adding a new search engine from the local file system became an awkward task.
As for the XML Search Engines Exporter/Importer extension which did the trick until Fx56, well..
Currently, a compat-with-Firefox-57-and-beyond port isn't possible at all.
](*,) ](*,) ](*,)
Brummelchen
Posts: 4480
Joined: March 19th, 2005, 10:51 am

Re: How can I add a custom search plugin to Fx57 Nightly?

Post by Brummelchen »

where is the problem? well known that since v45 a plain modification of searchplugins is denied. it hast explained here os many times:
- stop firefox
- delete search.json.mozlz4
- insert new xml
- restart firefox

or you create a search plugin here
http://mycroftproject.com/
and make it available for firefox (online-install)

both work also for firefox 57, it does NOT need any stupid extension for that (only some reading ;))
User avatar
earlpiggot
Posts: 726
Joined: May 30th, 2004, 2:40 pm
Location: Greece

[SOLVED] How can I add a custom search plugin to Fx57 Nightl

Post by earlpiggot »

Brummelchen wrote:where is the problem? well known that since v45 a plain modification of searchplugins is denied. it hast explained here os many times:
- stop firefox
- delete search.json.mozlz4
- insert new xml
- restart firefox

or you create a search plugin here
http://mycroftproject.com/
and make it available for firefox (online-install)

both work also for firefox 57, it does NOT need any stupid extension for that (only some reading ;))
Thanks, it worked fine! I searched before asking but didn't find any thread. I should have thought it though myself.
nohamelin
Posts: 96
Joined: September 3rd, 2013, 4:04 pm
Location: Chile

Re: How can I add a custom search plugin to Fx57 Nightly?

Post by nohamelin »

earlpiggot wrote:As for the XML Search Engines Exporter/Importer extension which did the trick until Fx56, well..
Currently, a compat-with-Firefox-57-and-beyond port isn't possible at all.
](*,) ](*,) ](*,)
Dev here: while a WebExtensions build isn't possible yet, the latest version of the add-on still works properly with current Nightly builds, if the installation of legacy add-ons is forced.
Brummelchen
Posts: 4480
Joined: March 19th, 2005, 10:51 am

Re: How can I add a custom search plugin to Fx57 Nightly?

Post by Brummelchen »

horray - i see upcoming a new rant when this option has died - tooo bad :p
sorry, but either you try it for real but not this nonsense or you forget it completely.

@earlpiggot
i had a request from a friend about repair his (my) xml file - i uploaded it to mycroft where my fault was pointed out.
btw please have in mind that created search plugins (xml) on mycroft are all public, but you need the right search term sometimes ;)
User avatar
earlpiggot
Posts: 726
Joined: May 30th, 2004, 2:40 pm
Location: Greece

Re: How can I add a custom search plugin to Fx57 Nightly?

Post by earlpiggot »

@Brummelchen
I had Fx rebuild search.json.mozlz4. No need for mycroft.
Post Reply