MozillaZine

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

Discussion about official Mozilla Firefox builds
earlpiggot

User avatar
 
Posts: 700
Joined: May 30th, 2004, 2:40 pm
Location: Greece

Post Posted August 31st, 2017, 2:32 am

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.

earlpiggot

User avatar
 
Posts: 700
Joined: May 30th, 2004, 2:40 pm
Location: Greece

Post Posted August 31st, 2017, 5:54 am

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: 1961
Joined: March 19th, 2005, 10:51 am

Post Posted August 31st, 2017, 7:52 am

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 ;))

earlpiggot

User avatar
 
Posts: 700
Joined: May 30th, 2004, 2:40 pm
Location: Greece

Post Posted August 31st, 2017, 8:10 am

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: 75
Joined: September 3rd, 2013, 4:04 pm
Location: Chile

Post Posted August 31st, 2017, 8:34 am

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: 1961
Joined: March 19th, 2005, 10:51 am

Post Posted August 31st, 2017, 9:39 am

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 ;)

earlpiggot

User avatar
 
Posts: 700
Joined: May 30th, 2004, 2:40 pm
Location: Greece

Post Posted August 31st, 2017, 12:47 pm

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

Return to Firefox Builds


Who is online

Users browsing this forum: streetwolf and 7 guests