Where did you install Firefox from? Help Mozilla uncover 3rd party websites that offer problematic Firefox installation by taking part in our campaign. There will be swag, and you'll be featured in our blog if you manage to report at least 10 valid reports!

搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

Learn More

editing search engine

more options

Hi I want to edit an existing search engine to change the url. To do so, i managed to extract the "search.json.mozlz4" via python-lz4 with a script from SuperUser https://superuser.com/questions/1269805/how-to-edit-search-engines-in-firefox-quantum

I changed the url and removed Amazon, eBay and Twitter (why are they there, i removed them in the settings?) and compressed it again. If i add the newly created "search.json.mozlz4" to the profile, the search engines are resetted to default. So i have a few questions: - There is a "hash" and a "visibleDefaultEnginesHash". Are they related to the "buildID"? - Is mozlz4 a customized version of the lz4 compression algorythm or the defult one? And last but not least: - If t is impossible to edit an existing search engine, is there a way to create a local one, without publishing it on addons.mozilla?

I know, Mozilla has some income about paid default search engines. But why making it so difficult to customize them? And no, downloading a engine as an addon i don't count as 'customizing'.

Hi I want to edit an existing search engine to change the url. To do so, i managed to extract the "search.json.mozlz4" via python-lz4 with a script from SuperUser https://superuser.com/questions/1269805/how-to-edit-search-engines-in-firefox-quantum I changed the url and removed Amazon, eBay and Twitter (why are they there, i removed them in the settings?) and compressed it again. If i add the newly created "search.json.mozlz4" to the profile, the search engines are resetted to default. So i have a few questions: - There is a "hash" and a "visibleDefaultEnginesHash". Are they related to the "buildID"? - Is mozlz4 a customized version of the lz4 compression algorythm or the defult one? And last but not least: - If t is impossible to edit an existing search engine, is there a way to create a local one, without publishing it on addons.mozilla? I know, Mozilla has some income about paid default search engines. But why making it so difficult to customize them? And no, downloading a engine as an addon i don't count as 'customizing'.

被采纳的解决方案

For testing purposes, what if you start by making only one change:

  • Decompress the .mozlz4 file to JSON
  • Edit the "_urls":[] array of the engine you want to modify with the updated path or parameters
  • Compress the JSON back to .mozlz4

Does that file work?

If not, there may be a problem with the compression method.

When you use the Remove button on the Preferences page search panel, Firefox assigns hidden=true to that search engine plugin. For example, you'll see this:

"_metaData":{"order":5,"hidden": true}

That doesn't touch the visibleDefaultEngines property (or its corresponding hash).

定位到答案原位置 👍 0

所有回复 (3)

more options

选择的解决方案

For testing purposes, what if you start by making only one change:

  • Decompress the .mozlz4 file to JSON
  • Edit the "_urls":[] array of the engine you want to modify with the updated path or parameters
  • Compress the JSON back to .mozlz4

Does that file work?

If not, there may be a problem with the compression method.

When you use the Remove button on the Preferences page search panel, Firefox assigns hidden=true to that search engine plugin. For example, you'll see this:

"_metaData":{"order":5,"hidden": true}

That doesn't touch the visibleDefaultEngines property (or its corresponding hash).

more options

Thanks, that makes sense. It worked! So if i make that file read-only, amazon & co. dont show up again after the next update?

And sorry; i formatted the text nicely but it didn't kept it...

more options

I've never tried making the file read-only. You probably should back it up somewhere just in case that doesn't protect it.